-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
10 changed files
with
158 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ _error | |
_format | ||
_format_root | ||
_gap | ||
_index | ||
_len | ||
_name | ||
_out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.