I had to deal with this issue when building json parser for logprobs. In reality it doesn't matter for the llm. They don't add escape in responses at least in structured outputs. Plus llms are trained to produce valid json. On top of that, why escaping is bad and how replacing it with yaml better?