diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-29 13:03:47 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-29 13:03:47 -0700 |
commit | ab99601555d48297af0897c022a8288283318100 (patch) | |
tree | 6ea988e2530fc51b731cb66df0283c51645e3aff /share | |
parent | 12800700f93639c259757f0f9def1546d215ee95 (diff) | |
download | txr-ab99601555d48297af0897c022a8288283318100.tar.gz txr-ab99601555d48297af0897c022a8288283318100.tar.bz2 txr-ab99601555d48297af0897c022a8288283318100.zip |
json: functions put-json and put-jsonl.
* eval.c (eval_init): Register put-json and put-jsonl
intrinsics.
* lib.c (out_json_str): Do not output the U+DC01 to U+DCFF
code points by masking them and using put_byte. This is
unnecessary; if we just send them as-is to the text stream,
the UTF-8 encoder does that for us.
(put_json, put_jsonl): New functions.
* lib.h (put_json, put_jsonl): Declared.
* txr.1: Documented. The bulk of tojson is moved under the
descriptions of these new functions, and elsewhere where the
document pointed to tojson for more information, it now points
to put-json. More detailed description of character treatment
is given.
* share/txr/stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/doc-syms.tl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/txr/stdlib/doc-syms.tl b/share/txr/stdlib/doc-syms.tl index 3f77d0d7..7f3dda77 100644 --- a/share/txr/stdlib/doc-syms.tl +++ b/share/txr/stdlib/doc-syms.tl @@ -1419,6 +1419,8 @@ ("put-byte" "D-002E") ("put-carray" "N-00737951") ("put-char" "D-0003") + ("put-json" "N-009C27EF") + ("put-jsonl" "N-009C27EF") ("put-line" "N-012163C3") ("put-lines" "N-0367B282") ("put-obj" "N-025DB229") |