On Mon, 16 Nov 2026 17:11:53 -0300, Anton Antimo wrote:
> It seems cl-json is automatically escaping slashes when I invoke > encode-json-to-string. I located the question > > https://stackoverflow.com/questions/60103909 > > that explains that the JSON spec mandates the escaping of slashes ...
The text of RFC8259 says “Any character may be escaped”. The grammar shows slash among those characters in the “escape” set, and a few others, including the uXXXX codes, but not “any [literal] character”. So it would appear the formal grammar doesn’t allow the escaping of other characters, even though the text says they can be. I would say that part of the formal grammar is wrong. You’re worried about unnecessary escapes, but you shouldn’t be, since the result is still valid JSON.