From: Dmitry Gutov <dgutov@yandex.ru>
To: Xu Chunyang <mail@xuchunyang.me>, 32793@debbugs.gnu.org
Subject: bug#32793: 27.0.50; json-parse-string doesn't have the equivalent of json.el's json-array-type
Date: Thu, 11 Apr 2019 19:26:23 +0300 [thread overview]
Message-ID: <b5ad6eb3-f335-fd56-7b48-d9e17997ed91@yandex.ru> (raw)
In-Reply-To: <m28t3v80vo.fsf@xuchunyang.me>
On 21.09.2018 15:56, Xu Chunyang wrote:
> We can parse JSON Array as Lisp List with json.el, e.g.,
>
> (let ((json-array-type 'list))
> (json-read-from-string "[1,2,3]"))
> ;; => (1 2 3)
>
> but the new json-parse-string doesn't have the equivalent, thus porting
> existing code to using json-parse-string might be difficult.
I also stumbled on this problem when trying to port existing code to
native JSON.
It's kind of surprising, considering lists are more common in Elisp, and
there's no JSON data structure that would correspond to them (so I can't
simply return a different format from the backing server process, I'll
have to convert).
next prev parent reply other threads:[~2019-04-11 16:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 12:56 bug#32793: 27.0.50; json-parse-string doesn't have the equivalent of json.el's json-array-type Xu Chunyang
2019-04-11 16:26 ` Dmitry Gutov [this message]
2019-04-11 16:46 ` Eli Zaretskii
2019-04-12 0:34 ` Dmitry Gutov
2019-04-12 9:22 ` Eli Zaretskii
2019-04-12 15:02 ` Dmitry Gutov
2019-04-12 15:26 ` Eli Zaretskii
2019-04-12 15:45 ` Dmitry Gutov
2019-04-12 17:42 ` Eli Zaretskii
2019-04-12 22:36 ` Dmitry Gutov
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=b5ad6eb3-f335-fd56-7b48-d9e17997ed91@yandex.ru \
--to=dgutov@yandex.ru \
--cc=32793@debbugs.gnu.org \
--cc=mail@xuchunyang.me \
/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.