1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 05:51:21 -08:00
emacs/test
Simen Heggestøyl 1e363a8ea5 Enable sorting of JSON object keys when encoding
* lisp/json.el (json-encoding-object-sort-predicate): New variable for
specifying a sorting predicate for JSON objects during encoding.
(json--plist-to-alist): New utility function.
(json-encode-hash-table): Re-use `json-encode-alist' when object keys
are to be sorted.
(json-encode-alist): Sort output by
`json-encoding-object-sort-predicate, when set.
(json-encode-plist): Re-use `json-encode-alist' when object keys are
to be sorted.
(json-pretty-print-buffer-ordered): New command to pretty print the
buffer with object keys sorted alphabetically.
(json-pretty-print-ordered): New command to pretty print the region with
object keys sorted alphabetically.

* test/automated/json-tests.el (test-json-plist-to-alist)
(test-json-encode-plist, test-json-encode-hash-table)
(test-json-encode-alist-with-sort-predicate)
(test-json-encode-plist-with-sort-predicate): New tests.

* etc/NEWS: Add an entry for the new commands.
2015-11-12 18:30:37 +01:00
..
automated Enable sorting of JSON object keys when encoding 2015-11-12 18:30:37 +01:00
cedet Spelling fixes 2015-02-21 20:01:05 -08:00
etags Spelling fixes 2015-11-10 10:23:00 -08:00
indent Add JSX indentation via js-jsx-mode. (Bug#21799) 2015-10-31 13:02:36 -07:00
BidiCharacterTest.txt Update data files from just-released Unicode 8.0 2015-06-18 11:14:13 +03:00
biditest.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
ChangeLog.1 ; Convert ChangeLog history files to "Bug#NNNN" 2015-04-18 19:48:24 -07:00
README Mention etc/compilation.txt 2009-07-26 15:59:37 +00:00
redisplay-testsuite.el ; Remove accidentally duplicated redisplay test. 2015-08-08 18:54:10 +03:00
rmailmm.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00

This directory contains files intended to test various aspects of
Emacs's functionality.  Please help add tests!

(Also, see etc/compilation.txt for compilation mode font lock tests.)