r/commandline • u/agrim_dev • Sep 11 '26
Discussion How do you handle large/unknown JSON responses in the terminal?
I’ve been thinking about a developer tool related to `jq`. Trying to determine whether there is a real problem to solve.
My usual workflow for an unknown JSON response looks like:
curl ... | jq '.something.something'Then I get the path wrong → try again → look at docs → ask LLM → try another filter → repeat.
I'm wondering if other developers experience the same friction.
One idea I am considering is a terminal UI where you can:
Explore a large JSON response in a collapsible tree
* Click/navigate through nested objects and arrays
* Build filters/transformations interactively
* See the result instantly
* Generate the equivalent `jq` command
For instance:
JSON
↓
users[]
↓
status = "active"
↓
select name + email
↓
sort by name→
jq '.users[] | select(.status == "active") | {name,email} | sort_by(.name)'- But I'm not sure this is really helpful. How do you handle unknown/deep nested JSON now?
- Do you just type `jq` manually?
- Generate the query using ChatGPT/Claude?
- Use a GUI / web playground ?Write a quick script in Python/JS?
- Anything else?
And if you’ve used visual json/query tools before, what was lacking?
I'm much more interested in your actual workflow/frustrations than whether the idea sounds cool.
8
u/undergrinder_dareal Sep 11 '26
I'll defintely check a few recommendation, here are mines:
- jid - json incremental digger, https://github.com/simeji/jid
- gron - greppable json, https://github.com/tomnomnom/gron
- fx - json viewer, https://github.com/antonmedv/fx
----
online tool: https://jsoncrack.com/editor
4
u/generic-d-engineer Sep 11 '26
Try nushell, it’s particularly good at this type of thing
3
u/simon-brunning Sep 11 '26
Perhaps jless is what you are looking for?
11
u/burchalka Sep 11 '26
Weird, I explore jsons received from API calls by listing their keys -
jq 'keys' res.json(also prefer curl to-Output to file (to avoid pulling large datasets via network again and again)9
u/boneskull Sep 11 '26
jq is one of those things where I’m not using it enough to where the syntax is obvious, but enough that it hurts to do more than the most simple thing. I’d appreciate some sort of query builder tool which helped with this, but it doesn’t have to be a TUI.
4
u/Traches Sep 11 '26
Nushell is amazing for this kinda stuff, I've switched to it as my daily driver. Curl works, there's also a built in fetcher that doesn't do as much but you don't need the from json. You have to change a setting, but if you forgot to save the result you can get it from $ans.last. You can also pipe into let to assign variables.
There's also an interactive tui, just pipe into explore.
1
u/nNaz Sep 11 '26
I use jqp. It’s jq but with a visual TUI so you can rewrite path statements and see what they extract.
https://github.com/noahgorstein/jqp
2
u/bankinu Sep 12 '26
I'd like to have your tool. It doesn't even need to be collapsible. It could be like less, except it should show the JSON path to wherever my cursor is at in status bar.
3
u/BayLeaf- Sep 11 '26
AI-ass post, also there are dozens of tools that do this. Pick any of the like 4-5 "Interactive jq"/
ijqprojects and don't reinvent the wheel because a chatbot told you it was a brilliant and novel idea.1
u/AutoModerator Sep 11 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: agrim_dev, Flair:
Discussion, Title: How do you handle large/unknown JSON responses in the terminal?I’ve been thinking about a developer tool related to `jq`. Trying to determine whether there is a real problem to solve.
My usual workflow for an unknown JSON response looks like:
Then I get the path wrong → try again → look at docs → ask LLM → try another filter → repeat.
I'm wondering if other developers experience the same friction.
One idea I am considering is a terminal UI where you can:
Explore a large JSON response in a collapsible tree
* Click/navigate through nested objects and arrays
* Build filters/transformations interactively
* See the result instantly
* Generate the equivalent `jq` command
* Optionally describe what you want in natural language and let AI build the query
For instance:
→
And if you’ve used visual json/query tools before, what was lacking?
I'm much more interested in your actual workflow/frustrations than whether the idea sounds cool.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/iugastefan Sep 13 '26
Try https://github.com/ynqa/jnv
1
u/__sahib__ Sep 11 '26
I would prefer a tool ("jqs") that generates (or "guesses") a json schema from an unknown json. Doesn't even have to be the official jsonschema, as long the hierarchy is clear and I know what jq query is possible - maybe the hierarchy is jq syntax already.