xq icon indicating copy to clipboard operation
xq copied to clipboard

[feature request] multi-format support

Open hh9527 opened this issue 4 years ago • 1 comments

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

hh9527 avatar Feb 10 '22 12:02 hh9527

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.

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!

MiSawa avatar Feb 10 '22 13:02 MiSawa