3 ms·
There pretty mighty tools around to grep/patch/generate JSON data with shell scripts and they are made to deal with hierarchical data. https://stedolan.github.
by webwurst 9y ago
There pretty mighty tools around to grep/patch/generate JSON data with shell scripts and they are made to deal with hierarchical data.
https://stedolan.github.io/jq/manual/ https://stedolan.github.io/jq/manual/
http://jsonnet.org/ http://jsonnet.org/
Both are single binaries, so easy to run them where you need it. I don't know comparable stuff for the other mentioned formats, whenever I need to deal with yaml in scripts i run
https://github.com/bronze1man/yaml2json https://github.com/bronze1man/yaml2json
I would be totally fine with any format that can be converted to JSON on the fly. Of course I would love to have something like these tools more integrated within a shell, but the representing text format on the disk is not that important for me.