News for hackers. Stuff that matters.
Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by ldd on Friday June 05, 2020 @06:15PM (#23434645)
I made a VSCode extension for jq[0], so I really like when people see the power of jq.

I should probably update it with a couple of life improvements now that I think about it.

[0]: https://github.com/ldd/vscode-jq

Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by prepend on Friday June 05, 2020 @07:03PM (#23434990)
Thanks for your plugin. I wish it had up arrow history. I keep a separate text log with commands and it would be nice if the plugin tracked them. Especially given the high numbers of jq syntax errors.
Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by ldd on Friday June 05, 2020 @10:49PM (#23436383)
Great feature request. I've been there.

I'll look into it for sure!

Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by originalvichy on Saturday June 06, 2020 @05:55PM (#23442571)
If this hasn’t been said:

Is there a way to instantly find out what filter to use when you click on a certain row? Kind of like doing exploratory jq on VSCode so you can quickly move it to the shell?

Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by ldd on Saturday June 06, 2020 @06:14PM (#23442721)
So, I don't really understand. but! Suppose you have a JSON file like this:

  [
    {
      "a": 1,
      "b": 2
    },
    {
      "a": 5,
      "b": 6
    },
  ]
what exactly do you want to do with it?
Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by originalvichy on Monday June 08, 2020 @06:06AM (#23455219)
If I was to click on the part that saus ’”b”:2’, could you show me the jq query I could use to get just that part of the json file?

Kind of similar to how some Git extensions show who has the last commit on a certain line of code when you click/place cursor on a line

Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by ldd on Tuesday June 09, 2020 @03:00PM (#23469609)
Gotcha. I'd honestly also would want this, but I don't see an easy way of implementing it.

It sort of makes me wonder how xpath queries work and what algorithms are used.

At face value, for certain JSON files, it is probably possible to do quickly, like in my example above, but the devil is always in the details...