all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "T.V Raman" <raman@google.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: JSON Parsing Edge Case
Date: Thu, 10 May 2018 19:30:28 -0700	[thread overview]
Message-ID: <p91in7uexff.fsf@google.com> (raw)
In-Reply-To: <CAM-tV-9q+_-fUWn6vHkb9ruPmK083npAw95eovwF3GUFUYe1Yg@mail.gmail.com> (Noam Postavsky's message of "Thu, 10 May 2018 19:56:47 -0400")

Noam Postavsky <npostavs@gmail.com> writes:

I meant  json-read-string --apologies. json-parse-buffer needs the
underlying emacs to be compiled with the json C module.
> On 10 May 2018 at 19:48, T.V Raman <raman@google.com> wrote:
>> 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")
>
> With json-read, and (json-read-from-string "{\"quote\": \"1\"}"), I get
>
>  ((quote . "1"))
>
> json-parse-string and json-parse-buffer don't seem to exist for me
> (using the latest master branch).
>

-- 



  reply	other threads:[~2018-05-11  2:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 23:48 JSON Parsing Edge Case T.V Raman
2018-05-10 23:56 ` Noam Postavsky
2018-05-11  2:30   ` T.V Raman [this message]
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=p91in7uexff.fsf@google.com \
    --to=raman@google.com \
    --cc=emacs-devel@gnu.org \
    --cc=npostavs@gmail.com \
    /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.