Here’s the new way, I found by googling “new OpenAI JSON-mode”:
Warning: According to that discussion it might be that only “gpt-4-1106-preview” supports this.