mirror of
https://github.com/wader/fq.git
synced 2024-11-23 18:56:52 +03:00
e3ae1440c9
Feels less cluttered, easier to read and more consistent. Still keep tovalue, tobytes etc that are more basic functions this only renamed format related functions. Also there is an exceptin for to/fromjson as it comes from jq. Also fixes lots of spelling errors while reading thru.
9 lines
290 B
Plaintext
9 lines
290 B
Plaintext
# overrides jq's standard tojson
|
|
def tojson($opts): _to_json($opts);
|
|
def tojson: _to_json(null);
|
|
# overrides jq's standard fromjson
|
|
# NOTE: should be kept in sync with format_decode.jq
|
|
def fromjson: decode("json") | if ._error then error(._error.error) end;
|
|
|
|
def _json__todisplay: tovalue;
|