bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32793: 27.0.50; json-parse-string doesn't have the equivalent of jso


From: Dmitry Gutov
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]