]> git.eshelyaron.com Git - emacs.git/commit
Support custom null and false objects when parsing JSON
authorJoão Távora <joaotavora@gmail.com>
Thu, 7 Jun 2018 16:41:19 +0000 (17:41 +0100)
committerJoão Távora <joaotavora@gmail.com>
Thu, 14 Jun 2018 23:11:56 +0000 (00:11 +0100)
commit9348039ed45c8e493e8bfef0220249d4d31ef6da
treee7f79a9013d4b80bfb6b980a216419662f982866
parent8cb9beb32163fa3ce3b052ced646fd673814ddc6
Support custom null and false objects when parsing JSON

* doc/lispref/text.texi (Parsing JSON): Describe new :null-object
and :false-object kwargs to json-parse-string and
json-parse-buffer.

* src/json.c
(struct json_configuration): New type.
(json_to_lisp): Accept a struct json_configuration* param.
(json_parse_args): Rename from json_parse_object_type.
(Fjson_parse_string): Rework docstring.
(Fjson_parse_string, Fjson_parse_buffer): Update call to
json_to_lisp.
(syms_of_json): Two new syms, QCnull_object and QCfalse_object.

* test/src/json-tests.el
(json-parse-with-custom-null-and-false-objects): New test.
doc/lispref/text.texi
src/json.c
test/src/json-tests.el