summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.131
1 files changed, 31 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 35ff288e..12eae868 100644
--- a/txr.1
+++ b/txr.1
@@ -71875,6 +71875,37 @@ Otherwise, the JSON is potentially subject to such formatting.
Even if the JSON data contains line breaks, it does not end in a line break.
+.coNP Function @ get-json
+.synb
+.mets (get-json >> [ source
+.mets \ \ \ \ \ \ \ \ \ \ >> [ err-stream
+.mets \ \ \ \ \ \ \ \ \ \ \ >> [ err-retval >> [ name <> [ lineno ]]]]])
+.syne
+.desc
+The
+.code get-json
+function closely resembles the
+.code read
+function, and follows the same argument and error reporting conventions.
+
+Rather than reading a Lisp object from the input source, it reads a JSON
+object, with support for \*(TX's JSON extensions.
+
+If an object is successfully read, its Lisp representation is returned.
+JSON numbers produce floating-point number objects.
+JSON strings produce string objects. The keywords
+.codn true ,
+.code false
+and
+.code null
+map to the Lisp symbols
+.codn t ,
+.codn nil ,
+and
+.codn null ,
+respectively.
+JSON objects map to hash tables, and JSON arrays to vectors.
+
.coNP Macro @ json
.synb
.mets (json [quote | sys:qquote] << object )