Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I need to grok a complex nested data structure then YAML is a 'mare, but JSON is not much better - even with nice IDE support. TBH end up just running a script to flatten the whole lot into lines of key-value pairs, where each key is.the.full.path.from.root, with numbers for array indices - NOW I can see what's going on. I believe this is similar to how TOML is structured, albeit people criticise it for being too verbose as a result!


For anyone looking for such a script, there's some CLIs that make it easy. One is `yq -o props` [1], another way is to use `yq -j` or `yj` [2] to convert to JSON and pipe it to `gron` [3].

[1] https://github.com/mikefarah/yq

[2] https://github.com/sclevine/yj

[3] https://github.com/tomnomnom/gron


http://www.youtube.com/watch?v=XNBqBWO4y08

This shows a TUI I've been working on to grok, munge, and ETL config. It leverages CUE, but it's not required




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: