diff options
| author | João Távora | 2018-06-09 15:27:49 +0100 |
|---|---|---|
| committer | João Távora | 2018-06-09 15:47:54 +0100 |
| commit | 4aed7ee79cbea9963a84d5d925d39f7bc07aed98 (patch) | |
| tree | 3e4867292f323a8a8c032fa50f5191febf1086dd /src | |
| parent | 3a8286696b4d7e843334da5d54edf2f8261451f8 (diff) | |
| download | emacs-4aed7ee79cbea9963a84d5d925d39f7bc07aed98.tar.gz emacs-4aed7ee79cbea9963a84d5d925d39f7bc07aed98.zip | |
After Eli's doc review
Diffstat (limited to 'src')
| -rw-r--r-- | src/json.c | 15 |
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 | ||
| 559 | OBJECT must be a vector, hashtable, alist, or plist and its elements | 559 | OBJECT must be a vector, hashtable, alist, or plist and its elements |
| 560 | can recursively contain the lisp equivalents to the JSON null and | 560 | can recursively contain the Lisp equivalents to the JSON null and |
| 561 | false values, t, numbers, strings, or other vectors hashtables, alists | 561 | false values, t, numbers, strings, or other vectors hashtables, alists |
| 562 | or plists. t will be converted to the JSON true value. Vectors will | 562 | or plists. t will be converted to the JSON true value. Vectors will |
| 563 | be converted to JSON arrays, whereas hashtables, alists and plists are | 563 | be 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 | |||
| 566 | and plist keys must be symbols; if a key is duplicate, the first | 566 | and plist keys must be symbols; if a key is duplicate, the first |
| 567 | instance is used. | 567 | instance is used. |
| 568 | 568 | ||
| 569 | The lisp equivalents to the JSON null and false values are | 569 | The Lisp equivalents to the JSON null and false values are |
| 570 | configurable in the arguments ARGS, a list of keyword/argument pairs: | 570 | configurable in the arguments ARGS, a list of keyword/argument pairs: |
| 571 | 571 | ||
| 572 | The keyword argument `:null-object' specifies which object to use | 572 | The keyword argument `:null-object' specifies which object to use |
| @@ -575,10 +575,10 @@ to represent a JSON null value. It defaults to `:null'. | |||
| 575 | The keyword argument `:false-object' specifies which object to use to | 575 | The keyword argument `:false-object' specifies which object to use to |
| 576 | represent a JSON false value. It defaults to `:false'. | 576 | represent a JSON false value. It defaults to `:false'. |
| 577 | 577 | ||
| 578 | Note that ambiguity can arise if you specify the same value for | 578 | In you specify the same value for `:null-object' and `:false-object', |
| 579 | `:null-object' and `:false-object', and so this function's behaviour | 579 | a potentially ambiguous situation, the JSON output will not contain |
| 580 | is unspecified | 580 | any JSON false values. |
| 581 | */) | 581 | usage: (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 | |||
| 843 | to represent a JSON null value. It defaults to `:null'. | 843 | to represent a JSON null value. It defaults to `:null'. |
| 844 | 844 | ||
| 845 | The keyword argument `:false-object' specifies which object to use to | 845 | The keyword argument `:false-object' specifies which object to use to |
| 846 | represent a JSON false value. It defaults to `:false'. */) | 846 | represent a JSON false value. It defaults to `:false'. |
| 847 | usage: (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 (); |