aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoão Távora2018-06-09 15:27:49 +0100
committerJoão Távora2018-06-09 15:47:54 +0100
commit4aed7ee79cbea9963a84d5d925d39f7bc07aed98 (patch)
tree3e4867292f323a8a8c032fa50f5191febf1086dd /src
parent3a8286696b4d7e843334da5d54edf2f8261451f8 (diff)
downloademacs-4aed7ee79cbea9963a84d5d925d39f7bc07aed98.tar.gz
emacs-4aed7ee79cbea9963a84d5d925d39f7bc07aed98.zip
After Eli's doc review
Diffstat (limited to 'src')
-rw-r--r--src/json.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/json.c b/src/json.c
index fc4bc1f3768..cd749e3068e 100644
--- a/src/json.c
+++ b/src/json.c
@@ -557,7 +557,7 @@ DEFUN ("json-serialize", Fjson_serialize, Sjson_serialize, 1, MANY,
557 doc: /* Return the JSON representation of OBJECT as a string. 557 doc: /* Return the JSON representation of OBJECT as a string.
558 558
559OBJECT must be a vector, hashtable, alist, or plist and its elements 559OBJECT must be a vector, hashtable, alist, or plist and its elements
560can recursively contain the lisp equivalents to the JSON null and 560can recursively contain the Lisp equivalents to the JSON null and
561false values, t, numbers, strings, or other vectors hashtables, alists 561false values, t, numbers, strings, or other vectors hashtables, alists
562or plists. t will be converted to the JSON true value. Vectors will 562or plists. t will be converted to the JSON true value. Vectors will
563be converted to JSON arrays, whereas hashtables, alists and plists are 563be converted to JSON arrays, whereas hashtables, alists and plists are
@@ -566,7 +566,7 @@ embedded null characters and must be unique within each object. Alist
566and plist keys must be symbols; if a key is duplicate, the first 566and plist keys must be symbols; if a key is duplicate, the first
567instance is used. 567instance is used.
568 568
569The lisp equivalents to the JSON null and false values are 569The Lisp equivalents to the JSON null and false values are
570configurable in the arguments ARGS, a list of keyword/argument pairs: 570configurable in the arguments ARGS, a list of keyword/argument pairs:
571 571
572The keyword argument `:null-object' specifies which object to use 572The keyword argument `:null-object' specifies which object to use
@@ -575,10 +575,10 @@ to represent a JSON null value. It defaults to `:null'.
575The keyword argument `:false-object' specifies which object to use to 575The keyword argument `:false-object' specifies which object to use to
576represent a JSON false value. It defaults to `:false'. 576represent a JSON false value. It defaults to `:false'.
577 577
578Note that ambiguity can arise if you specify the same value for 578In you specify the same value for `:null-object' and `:false-object',
579`:null-object' and `:false-object', and so this function's behaviour 579a potentially ambiguous situation, the JSON output will not contain
580is unspecified 580any JSON false values.
581*/) 581usage: (json-serialize STRING &rest ARGS) */)
582 (ptrdiff_t nargs, Lisp_Object *args) 582 (ptrdiff_t nargs, Lisp_Object *args)
583{ 583{
584 ptrdiff_t count = SPECPDL_INDEX (); 584 ptrdiff_t count = SPECPDL_INDEX ();
@@ -843,7 +843,8 @@ The keyword argument `:null-object' specifies which object to use
843to represent a JSON null value. It defaults to `:null'. 843to represent a JSON null value. It defaults to `:null'.
844 844
845The keyword argument `:false-object' specifies which object to use to 845The keyword argument `:false-object' specifies which object to use to
846represent a JSON false value. It defaults to `:false'. */) 846represent a JSON false value. It defaults to `:false'.
847usage: (json-parse-string STRING &rest ARGS) */)
847 (ptrdiff_t nargs, Lisp_Object *args) 848 (ptrdiff_t nargs, Lisp_Object *args)
848{ 849{
849 ptrdiff_t count = SPECPDL_INDEX (); 850 ptrdiff_t count = SPECPDL_INDEX ();