1
1
mirror of https://github.com/wader/fq.git synced 2024-09-17 14:57:09 +03:00
fq/pkg
Mattias Wadman c0352f2fd1 decode,interp: Don't shadow _key and error on missing _key
For fromjson and other "value" decode values fq make then behave both like
a normal jq value and decode value. This is to make tobytes, format etc work.
Before all _* would be treated as special keys. Now they are first looked up in
the wrapped value and then as decode values.

Also now ._key that don't exist reutrn null instead of throw error.

$ fq -n '`{"_format": 123}` | fromjson | ._format'
Now:
123
Before:
"json"

$ fq -n '`{}` | fromjson | ._missing'
Now:
null
Before
error
2023-09-03 10:47:59 +02:00
..
bitio interp,decode: Support decode group argument 2023-05-03 10:01:13 +02:00
checksum crc: Unbreak build on 32-bit arch 2021-12-25 15:47:54 +01:00
cli doc: fix typos 2023-05-14 21:45:15 +08:00
decode gomod: Update x/exp and gomarkdown 2023-08-09 14:36:51 +02:00
fqtest fqtest: Run tests in parallell 2022-08-23 20:08:44 +02:00
interp decode,interp: Don't shadow _key and error on missing _key 2023-09-03 10:47:59 +02:00
ranges gomod: Update x/exp and gomarkdown 2023-08-09 14:36:51 +02:00
scalar interp: Add skip_gaps option for tovalue/-V 2023-04-30 13:04:39 +02:00