Hacker News new | ask | show | jobs
by BaconJuice 2560 days ago
Just curious, what would be the use case for something like this?
3 comments

Author here. I use it all the time when working with jq [1] to find the path of the nodes that I want to select or filter. It also makes it much easier to understand the structure of deeply nested JSON files.

[1] https://stedolan.github.io/jq

I could see it being useful when using grep or writing awk scripts. For the latter you usually have to carry around some state if you want to deduce the path to a desired leaf node.

I could also see it useful for just finding the index of a particular array entity.

Easier to parse maybe. You can parse it line by line. I also think this format is easier to edit.