echo '{"name": "hello"}\n{"name": "world"}' | fx '.name'
would output what? My guess is hello world but it might be hello\nworld.Fx – Terminal JSON Viewer
11–20 of 80 posts
Re: Fx – Terminal JSON Viewer
#12Having used https://jqlang.github.io/jq/ , wondering your pitch on advantages, alternative use cases for using fx?
Re: Fx – Terminal JSON Viewer
#13Having used https://jqlang.github.io/jq/ , wondering your pitch on advantages, alternative use cases for using fx?
echo '{"name": "world"}' | fx 'x => x.name' 'x => `Hello, ${x}!`'
Is immediately grokkable compared to jq's syntax.I love jq, I think it's extremely powerful, but I have to load up the documentation in a side window every time I have use it.
Re: Fx – Terminal JSON Viewer
#14Re: Fx – Terminal JSON Viewer
#15Having used https://jqlang.github.io/jq/ , wondering your pitch on advantages, alternative use cases for using fx?
Not OP but echo '{"name": "world"}' | fx 'x => x.name' 'x => `Hello, ${x}!`' Is immediately grokkable compared to jq's syntax. I love jq, I think it's extremely powerful, but I have to load up the documentation in a side window every time I have use it.
echo '{"name": "world"}' | jq '"Hello \(.name)"'Re: Fx – Terminal JSON Viewer
#16Hey HN friends! I've taken `fx` back to the drawing board and completely rewritten it from the ground up. Excited to share what's new: 1. *Going Big*: `fx` now gracefully handles even the most massive JSON files. 2. *A New TUI Look*: Dive deep into your data with a revamped terminal interface—now with themes! 3. *Swift Navigation with Dig Fuzzy Search*: Feeling lost in JSON? Just type `.` and navigate with ease. 4. *…
wow nice, I'll give this a try. I've always used jq for viewing json, but it's the wrong tool for my use. I basically want to explore json interactively, not parse it specifically. So the workflow is to keep "jq"ing it, and modifying my jq query until I find what I'm looking for. Your tool looks like it allows interactive exploration.
Re: Fx – Terminal JSON Viewer
#17 /one/two
/one/three/four
/one/three/five
/six
I ended up converting it to a JSON with a one-off Python script, and then using fx for the viewing. It worked very well! Thank you for the tool!(Incidentally, I’ve been writing my own viewer [0] to satisfy my original need more straightforwardly, but that’s still in very early stages.)
Re: Fx – Terminal JSON Viewer
#18it is written in Go. What does it have to do with npx/npm at all? Did I miss something about these tools?
Re: Fx – Terminal JSON Viewer
#19Do you mean to say "efficiency" or "performance"? I dont see both working like that
Re: Fx – Terminal JSON Viewer
#20Hey HN friends! I've taken `fx` back to the drawing board and completely rewritten it from the ground up. Excited to share what's new: 1. *Going Big*: `fx` now gracefully handles even the most massive JSON files. 2. *A New TUI Look*: Dive deep into your data with a revamped terminal interface—now with themes! 3. *Swift Navigation with Dig Fuzzy Search*: Feeling lost in JSON? Just type `.` and navigate with ease. 4. *…
Is there a commonly-used grammar for "json with comments and trailing commas" or does everyone just try to copy the jsonc from vscode?