diff options
| author | Damien Cassou | 2018-05-19 08:36:32 +0200 |
|---|---|---|
| committer | Nicolas Petton | 2018-06-14 11:01:49 +0200 |
| commit | 8cb9beb32163fa3ce3b052ced646fd673814ddc6 (patch) | |
| tree | 57f2140a14a50c59d7b1caa875351e66448f4336 /src/json.c | |
| parent | 967d2c55ef3908fd378e05b2a0070663ae45f6de (diff) | |
| download | emacs-8cb9beb32163fa3ce3b052ced646fd673814ddc6.tar.gz emacs-8cb9beb32163fa3ce3b052ced646fd673814ddc6.zip | |
Fix pretty-printing empty objects as null
* lisp/json.el (json-pretty-print): Force distinction between empty
objects and null.
(json-encode-list): Remove responsibility to print "null" as this
value is not a list.
(json-encode): Give higher precedence to lists so that an empty list
is printed as an empty object, not as "null".
* test/lisp/json-tests.el (test-json-encode): Add many tests to check
the behavior of pretty-printing.
Diffstat (limited to 'src/json.c')
0 files changed, 0 insertions, 0 deletions