Article View: comp.lang.lisp
Article #56Re: on cl-json and slashes
From: steve g
Date: Sat, 21 Nov 2026 00:51
Date: Sat, 21 Nov 2026 00:51
41 lines
2558 bytes
2558 bytes
Kaz Kylheku <046-301-5902@kylheku.com> writes:
> I'm obviously not Microsoft:
Yes, I know this. Microsoft in the days of DOS decided to use
backslashes \ for path seperators. so you need to do
cd \\home\\steve\\local
Microsoft usually tries to break other peoples stuff; in this case UNiX
and mac. It's like the end of line character.
> This is the TXR Lisp interactive listener of TXR 302.
> Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
> 1> (put-json #("foo" "/bar"))
> ["foo","/bar"]t
> 2> (put-json #("foo" "</bar"))
> ["foo","</bar"]t
> 3> (put-json #("foo" "</s"))
> ["foo","</s"]t
> 4> (put-json #("foo" "</sc"))
> ["foo","</sc"]t
> 5> (put-json #("foo" "</scr"))
> ["foo","</scr"]t
> 6> (put-json #("foo" "</scri"))
> ["foo","</scri"]t
> 7> (put-json #("foo" "</scri>"))
> ["foo","</scri>"]t
> 8> (put-json #("foo" "</script>"))
> ["foo","<\/script>"]t
> Yes, escaping every slash, regardless of whether it causes a
> script end tag ambiguity, would annoy users.
> A slash is a path separator; a shit ton of strings that end up in JSON contain
> URLs and paths. To have a backslash on each path separating slash would be
> insane.
Have you tried Microsoft's new editor for JSON? It will work, then break.
Technical Details
Message-ID:
<87qzgf57nn.fsf@gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<87jymcbkom.fsf@safunu.org> <11dg1qo$3veh5$1@dont-email.me> <87y0ar92sn.fsf@safunu.org> <878q2q4tgl.fsf@gmail.com> <20261117220524.407@kylheku.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 21 Nov 2026 00:51:08 +0000 From: steve g <Sgonedes1977@gmail.com> Newsgroups: comp.lang.lisp Subject: Re: on cl-json and slashes References: <87jymcbkom.fsf@safunu.org> <11dg1qo$3veh5$1@dont-email.me> <87y0ar92sn.fsf@safunu.org> <878q2q4tgl.fsf@gmail.com> <20261117220524.407@kylheku.com> Date: Fri, 20 Nov 2026 19:51:08 -0500 Message-ID: <87qzgf57nn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:hoe0JA2FZTcX3XYX0tfSzJEL8MA= MIME-Version: 1.0 Content-Type: text/plain Lines: 41 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-VcMjY/XNeEUd3a/i+yGesRAISfVs+ibNdUz44cA42EozcyWVA3RrlMpIHjKl8FxDRMjPxwCnlcF687h!eT1LQ1jQOChG67S0locvgYbov/0VjVWBi1M3ZaBkRl9HMxQ= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40