Open jviotti opened 5 months ago
I'm on vacations at the moment, but I'll take care of it very soon!
YAML support would be much appreciated!
another +1 on yaml; to save the yq
conversion before running jsonschema
I promise I'll get into it soon! I gave it a shot back then, but correctly implementing commands like fmt
on YAML proved to be a bit of a challenge. I think I'll implement it at least for the commands that it's easier to do as a first step. If you are aware of a YAML parser/stringifier in C/C++ that is dependency-free, please let me know!
I promise I'll get into it soon! I gave it a shot back then, but correctly implementing commands like
fmt
on YAML proved to be a bit of a challenge. I think I'll implement it at least for the commands that it's easier to do as a first step.
I agree fmt
is a challenge, but maybe leave that out as a later part. Focusing on reading / convert to JSON / validate.
There are a lot of options & ways to format YAML that are all "correct" but stylistic choices that make more sense in some documents than others (e.g. a short array being inlined, but a longer array being split over lines).
If you are aware of a YAML parser/stringifier in C/C++ that is dependency-free, please let me know! Quick research for you:
project | license | dependencies | notes | |
---|---|---|---|---|
https://github.com/jbeder/yaml-cpp | MIT | cmake | not maintained anymore? concerns about const-correctness https://github.com/jbeder/yaml-cpp/issues/1275 | |
https://github.com/pantoniou/libfyaml/ | MIT+GPL2+BSD-2-Clause | xxhash bundled | not sure how alive upstream is | |
https://pyyaml.org/wiki/LibYAML | MIT | cmake | make | "stable" |
https://github.com/tlsa/libcyaml | ISC | libyaml & make | most active library I can see |
Thanks a lot for the research @robbat2 ! Worth giving libYAML
and libcyaml
a shot
Need it too, VSCode extension YAML of redhat does it but we need a cli docker tool for CI :)