Lurker News

Comments (120) 40 threads

Earlier comments
BaconJuice3 replies#
Just curious, what would be the use case for something like this?
ofxartem#
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.

z3t4#
Easier to parse maybe. You can parse it line by line. I also think this format is easier to edit.
soheilpro#
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

fareesh#
I use the "JSON viewer awesome" extension on Chrome. It displays JSON in a collapsible verticle tree and has a copy path button.

This is a nice CLI based alternative

Load more comments