adamritter / fastgron

High-performance JSON to GRON (greppable, flattened JSON) converter
MIT License
592 stars 10 forks source link

FR: rainbow-colored keys to differentiate key depth #14

Open chrisgrieser opened 1 year ago

chrisgrieser commented 1 year ago

Thanks for the nice tool, this makes working with jsons so much more pleasant.

One idea I had was to have an option to colorize the keys in a manner that you can differentiate them more. Given this example line:

json.one.two.three.four = "foobar"

one, two, three, and four will all be colored blue when using --color. However, I'd find it much more useful if the first key had a different color from the second, etc. For example, one would be blue, two would be yellow, three red, and four magenta.

So instead of using color to differentiate types like right now, use color to differentiate between depth of keys.