ictree icon indicating copy to clipboard operation
ictree copied to clipboard

Parse json?

Open dufferzafar opened this issue 2 years ago • 3 comments

I know this sounds far fetched, but do you think ictree could be used as an interactive JSON viewer? Like jless.

This would allow us to use ictree as an interactive tree as well, since tree supports json output as well, so something like this would work: tree -J | ictree

dufferzafar avatar Jun 22 '22 17:06 dufferzafar

I like the idea of using ictree as JSON viewer! Although, I would like to avoid adding extra complexity. Maybe there is a tool that converts JSON to a format that ictree understands? So we could view JSON files like this:

sometool < file.json | ictree

NikitaIvanovV avatar Jun 22 '22 17:06 NikitaIvanovV

I mean, gron is such a tool, but it needs to be used with ictree -s . but that has issues like it will split on . and mess up any floating point numbers in the JSON etc.

dufferzafar avatar Jun 22 '22 17:06 dufferzafar

Thanks for the suggestion! I will see if I can implement it.

NikitaIvanovV avatar Jun 25 '22 16:06 NikitaIvanovV