Commit Graph

8 Commits

Author SHA1 Message Date
Mike Farah 26356ff4be Added github action fix for parsing xml, updated linter 2022-02-07 11:55:55 +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 08fc058934 Fix JSON encoding removing null #985 2021-10-30 13:37:21 +11:00
evnp 1be3b31bbc Don't escape HTML chars when converting to json
json.Encoder and json.Marshal implicitly use HTMLEscape to convert
>, <, &, with \u003c, \u003e, \u0026. This behavior carries over
to yq, where chars will be escaped when outputting json but not when
outputting yaml.

This changeset disables this behavior via encoder.SetEscapeHTML(false).
Unfortunately there is no equivalent option for json.Marshal, so its
single usage has been replaced with an encoder (with escaping disabled).
2021-02-11 10:58:40 +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 83cb6421df added test to ensure json keys remain in order 2020-11-17 16:17:38 +11:00