🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.lisp
Article #47

Re: on cl-json and slashes

#47
From: Anton Antimo
Date: Tue, 17 Nov 2026 10:21
24 lines
2175 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:

> 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.

I'm just curious why someone would escape slashes and make it the
default on a library to handle JSON (of any sort).
Technical Details
Message-ID: <87y0ar92sn.fsf@safunu.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <87jymcbkom.fsf@safunu.org> <11dg1qo$3veh5$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Anton Antimo <anton@safunu.org>
Newsgroups: comp.lang.lisp
Subject: Re: on cl-json and slashes
Date: Tue, 17 Nov 2026 07:21:12 -0300
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <87y0ar92sn.fsf@safunu.org>
References: <87jymcbkom.fsf@safunu.org> <11dg1qo$3veh5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 17 Nov 2026 11:00:05 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="377906"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18XWtDLkCuJDE0hpI8f+7oE78VaczHfDRI="; posting-host="db8f451c0649bd8304488a523ff1be18"
Cancel-Lock: sha1:K+ctt3GaYRrJuM1RdPJHBSVKrmk=
	sha1:w4uR+2OhcO9lHV93wP8pSLgcfo8= sha256:chw61AFWzJ2d+oyiOSAvZi650P6sxEZCUddLRqRTYdQ=
	sha1:rWMxVf8UNfuG0//JbSc+CAlEZQM= sha256:jaGTSAmB6+DiEh7SJ9jD2GTREn1RSGnCQRVH5Hp0EXA=