]> git.eshelyaron.com Git - emacs.git/commit
Maintain ordering of JSON object keys by default
authorSimen Heggestøyl <simenheg@gmail.com>
Sat, 3 Oct 2015 21:52:36 +0000 (23:52 +0200)
committerSimen Heggestøyl <simenheg@gmail.com>
Sat, 3 Oct 2015 21:52:36 +0000 (23:52 +0200)
commit6b66375133a54ea37106b00786d3a85f7c6d658d
treec1430aec49e3610c6db7d6aa082988fbfc159b78
parent9a05f0ac953ce19395c7409aed6bdd8db83cebb0
Maintain ordering of JSON object keys by default

* lisp/json.el (json-object-type): Mention order handling in doc-string.
(json--plist-reverse): New utility function.
(json-read-object): Maintain ordering for alists and plists.
(json-pretty-print): Ensure that ordering is maintained.

* test/automated/json-tests.el (test-json-plist-reverse): New test for
`json--plist-reverse'.
(json-read-simple-alist): Update test to accommodate for changes in
`json-read-object'.

* etc/NEWS: Document the new behavior of the pretty printing functions.
etc/NEWS
lisp/json.el
test/automated/json-tests.el