xq
xq copied to clipboard
[feature request] multi-format support
I found xq use serde as its deserializer, so it is possible to support other format beside json (yaml for example).
cat a.yaml | xq --fmt yaml
cat b.data | xq --fmt msgpack
and one more step, support schemaless data with additional schema
cat b.bin | xq --fmt bincode --schema my-bincode-schema.json --schema-fmt json
it is possible to support other format beside json (yaml for example).
Yeah that's actually why xq is prefixed by x instead of j. Though I neglected this for quite a while since it has a limitation (it has to have multi-document support) and I don't know each format enough.
-
serde_yamlsupports multidoc deserialization so it should be easy to support YAMLs. -
rmp-serde(stands for Rust Message Pack) on the other hand doesn't have support for multidoc deserialization yet.
and one more step, support schemaless data with additional schema
Passing schema for schemaless data is a great idea! It'll have the same limitation with above, but resolves the fundamental issue!