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, but
doesn't really explain why, although it says there's not quite a
practical need for that.
Do you know why the escaping of slashes was considered in the first place?
My solution has been to follow the suggestion in the answer (to the
question 60109909). So I wrote:
(defun json-response (data)
(let ((cl-json::+json-lisp-escaped-chars+
(remove #\/ cl-json::+json-lisp-escaped-chars+ :key #'car)))
(cl-json:encode-json-to-string data)))
on cl-json and slashes
- From
- Anton Antimo <ant…@safunu.org>
- Organization
- A noiseless patient Spider
- Message-ID
- <87jy…@safunu.org>
- Date
- Newsgroups
- comp.lang.lisp