From: "T.V Raman" <raman@google.com>
To: emacs-devel@gnu.org
Subject: JSON Parsing Edge Case
Date: Thu, 10 May 2018 16:48:05 -0700 [thread overview]
Message-ID: <p91r2mjrs22.fsf@retriever.mtv.corp.google.com> (raw)
The following happens with both json-read -- the elisp implementation
as well as json-parse-string implemented in C --
Try this json fragment -- by typing it into an empty buffer:
{"quote": "1"}
The above is a json dict with one key -- "quote" -- with value 1.
Parsing this into an emacs alist -- either with (json-read) or
(json-parse-buffer)
yields the following lisp structure --
('. "1")
the list structure is really
(quote . "1")
but the elisp reader has turned that symbol "quote" into an "'"
--
next reply other threads:[~2018-05-10 23:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 23:48 T.V Raman [this message]
2018-05-10 23:56 ` JSON Parsing Edge Case Noam Postavsky
2018-05-11 2:30 ` T.V Raman
2018-05-11 8:45 ` Basil L. Contovounesios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p91r2mjrs22.fsf@retriever.mtv.corp.google.com \
--to=raman@google.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.