diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-07-12 01:32:47 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-07-12 01:32:47 -0700 |
commit | 175075adce87494c9eb97bf7f430dd4a68d623e5 (patch) | |
tree | 6452046e87f6e1962857ba353849970fe7820208 /eval.c | |
parent | b5d0562d94ac79b446bf40a9c13fd8e1dd27c159 (diff) | |
download | txr-175075adce87494c9eb97bf7f430dd4a68d623e5.tar.gz txr-175075adce87494c9eb97bf7f430dd4a68d623e5.tar.bz2 txr-175075adce87494c9eb97bf7f430dd4a68d623e5.zip |
json: new special var *print-json-type*.
This variable controls whether we emit the "__type" key
for structures.
* lib.c (out_json_rec): React to the new variable, via
the flag in the json_opts structure: include the "__type" key
only if it is requested.
(out_json, put_json): Initialize the type flag in the josn_opts
according to the *print-json-type* dynamic variable.
* stream.c (print_json_type_s): New symbol variable.
(stream_init): print_json_type_s initialized, and
corresponding special variable registered, with intial value t.
* stream.h (struct json_opts): New bitfield member, type.
(print_json_type_s): Declared.
* txr.1: Documented.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions