OpenAI won't let you "escape" freely in JSON mode (opens in new tab)
Skip to content ### Authors * Weixuan Xiao ### Published June 23, 2026 ## TL;DR Accented characters like `é` may be escaped in JSON as `\u00e9`. We found that **OpenAI’s** and **Azure OpenAI’s endpoints** can’t emit these correctly in JSON mode: after the prefix `\u00`, the decoder allows only control-character completions (`\u0000` \- `\u001f`). So `é` cannot form. The output stays valid JSON but holds the wrong bytes — typically a `NUL` plus literal `e9` (`\u0000e9`). Once parsed, ...
Read the original article