add xml support as xq (from python yq)#215
Conversation
|
hello, I'm still doing havy tests on our servers, I let you know when it is ready for publishing |
| OutputTab bool `long:"tab" description:"use tabs for indentation"` | ||
| OutputYAML bool `long:"yaml-output" description:"output in YAML format"` | ||
| OutputYAML bool `short:"y" long:"yaml-output" description:"output in YAML format"` | ||
| OutputXML bool `short:"x" long:"xml-output" description:"output in XML format"` |
There was a problem hiding this comment.
(Note: I'm not the author of gojq, just an interested third party.)
I think it makes sense to add even more formats in the future (toml, msgpack, bson, etc), but this list of boolean flags will grow unmanageable.
What do you think about --input-format=xml and --output-format=xml instead of these format-specific parameters?
There was a problem hiding this comment.
Sure, looks to be a very good idea :)
|
If anyone is interested, a binary built called "xjq" is available here; https://github.com/momiji/xjq. |
The idea it to add xml support the same as xq (installed with python yq).
It supports multiple xml inputs, that xq does not allow.
On read, much faster than original xq.
On write, many times faster than json2xml.
I'm opened to ideas.