diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-29 08:33:41 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-29 08:33:41 -0700 |
commit | 12800700f93639c259757f0f9def1546d215ee95 (patch) | |
tree | 8d1c58396447148dec418f3dc9c5819083404d4a /txr.1 | |
parent | b3a49b161a6192d4b8c574f0cd7f9b16567cd834 (diff) | |
download | txr-12800700f93639c259757f0f9def1546d215ee95.tar.gz txr-12800700f93639c259757f0f9def1546d215ee95.tar.bz2 txr-12800700f93639c259757f0f9def1546d215ee95.zip |
json: tojson must not add #J prefix.
* lib.c (out_json_rec): In the CONS case, if ctx is null bail
and report and invalid object. This lets us call the function
with a null context.
(tojson): Do not support (json ...) syntax. Instead of
obj_print, pass the object directly to out_json_rec.
* txr.1: Do not mention handling json macro syntax.
Common leading text factored out of bulleted paragraphs section.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 24 |
1 files changed, 6 insertions, 18 deletions
@@ -71854,18 +71854,6 @@ function converts .meta obj into JSON notation, returned as a character string. -If -.meta obj -is -.code json -macro syntax generated by the parser, or else generated programmatically in a compatible way, -then this is converted back into JSON syntax. - -Otherwise if -.meta obj -conforms to the conventions by which JSON objects are represented in Lisp, -it is converted to JSON syntax also. - The behavior is unspecified if .meta obj or any component of @@ -71873,10 +71861,10 @@ or any component of is an object incompatible with the JSON representation conventions. An exception may be thrown. -An object conforms to the JSON representation conventions if: +An object conforms to the JSON representation conventions if it is: .RS .IP 1. -It is one of the symbols +one of the symbols .codn nil , .code t or @@ -71888,13 +71876,13 @@ and .codn null , respectively. .IP 2. -It is a floating-point number. +a floating-point number. .IP 3. -It is a character string. +a character string. .IP 4. -It is a vector of JSON-conforming objects. +a vector of JSON-conforming objects. .IP 5. -It is a hash table whose keys and values are JSON-conforming objects. +a hash table whose keys and values are JSON-conforming objects. .RE .IP Note that if unless the keys in a hash table are all strings, nonstandard JSON |