Commit Graph

25 Commits

Author SHA1 Message Date
Valentin Lab
5fd2890d1b
Add `--nul-output|-0` flag to separate element with NUL character (#1550)
This is to ensure solid parsing of complex data (with any binary
content except NUL chars) by separating the `yq` root collection
member's output with NUL char. As a safe-guard, an error will be cast
if trying to use NUL character with content that contains itself NUL
characters inside.
2023-03-29 09:51:55 +11:00
Anders Björklund
cf8cfbd865
Allow build without json and xml support (#1556)
* Refactor ordered_map into separate files

Separate json and xml, from the regular yaml.

Makes it possible to compile, without those...

* Refactor encoder and decoder creation

Use more consistent parameters vs globals

Return errors instead of calling panic()

* Allow build without json and xml support
2023-03-01 13:19:06 +11:00
Mike Farah
1d35134310 Unwrap scalar now works for JSON encoding when explicitly set #1409 2022-11-10 19:21:18 +11:00
Mike Farah
880397d549
Refactored decoder responsibilities (#1402)
- improved comment handling
- yaml decoder now responsible for leading content work around
2022-10-28 14:16:46 +11:00
Mike Farah
b9a1ef89fe
Added NDJSON decoder (#1281) 2022-07-27 12:26:22 +10:00
Mike Farah
fbe49c3700 Added colors to json output #1208 2022-05-22 21:19:59 +10:00
Mike Farah
26356ff4be Added github action fix for parsing xml, updated linter 2022-02-07 11:55:55 +11:00
Mike Farah
535799462f Added eval operator 2022-02-01 14:47:51 +11:00
Mike Farah
ec8ef312ef
Added XML encoding/decoding (#1067)
* Added XML encoding/decoding

* Minor fixes

* Improve yq doc

* Lint
2022-01-15 11:57:59 +11:00
Mike Farah
df32baedf1
Added XML decoder (#1044) 2021-12-21 15:02:07 +11:00
Mike Farah
11b6261e8b remove leading content indicator 2021-11-14 10:59:50 +11:00
Mike Farah
5df71162c9 fixed printer test 2021-11-14 10:59:50 +11:00
Mike Farah
0b2688c0f1 Split printer 2021-10-30 10:04:41 +11:00
Mike Farah
8c1a96d121 Properties encoder wip 2021-07-25 18:08:33 +10:00
Mike Farah
4e628327c4 Better way of processing leading content 2021-07-20 10:19:55 +10:00
Mike Farah
bbebebe30c Fixed for most cases, except strip comments 2021-07-20 09:18:40 +10:00
Mike Farah
dafa114e65 Added printer tests 2021-07-19 20:12:04 +10:00
Mike Farah
519cf1dcd7 wip 2021-07-19 19:58:47 +10:00
Mike Farah
d74bb8e28d Adding magic to detect leading seperators 2021-07-15 11:34:49 +10:00
Mike Farah
3722367fbb Dont print doc separators for JSON (https://github.com/mikefarah/yq/issues/735) 2021-03-19 12:40:56 +11:00
Mike Farah
c6efd5519b Pass context through operators
Allows more sophisticated functionality
2021-02-11 10:58:40 +11:00
Mike Farah
09a9e1e7f0 handle multiple document streams 2020-12-15 14:33:50 +11:00
Mike Farah
d38caf6bc2 Added File operators 2020-11-20 22:57:32 +11:00
Mike Farah
9bd9468526 Minor fixes 2020-11-19 22:11:26 +11:00
Mike Farah
2c062bc2a5 Added printer test 2020-11-18 09:52:03 +11:00