Live data from Hacker News

Q: A faster re-implementaiton of jq written in Reason Native/OCaml

github.com

191–196 of 196 posts

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#191
post #105

Earlier quoted context omitted.

Don't forget powershell's Convert-FromJson :) https://docs.microsoft.com/en-us/powershell/module/microsoft...

That is so not jq! I've really been pining for jq on my current Windows project :-(

What do you feel is missing?

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#192
post #105
post #82

For everyone pining for a Jq with a different syntax: I have a bunch of links to alternatives collected, you might want to try some of them (some may be for different things than JSON): https://github.com/fiatjaf/awesome-jq https://github.com/TomConlin/json2xpath https://github.com/antonmedv/fx https://github.com/fiatjaf/jiq https://github.com/simeji/jid https://github.com/jmespath/jp https://github.com/cube2222/jql…

Don't forget powershell's Convert-FromJson :) https://docs.microsoft.com/en-us/powershell/module/microsoft...

Does it still convert only two levels by default?

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#194

Earlier quoted context omitted.

I think at least two people in the thread pointed out that you can use /dev/stdin as a file.

It's more than a little strange that isn't default behavior out of the box without specifying input. How do the authors think jq is used?

I trend to use jq with a file all the time, I prefer to curl first and later operate on top. /slug

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#195
post #103

Earlier quoted context omitted.

To be fair that is a JSON parse error.

Yes, but the inputs to jq are not JSON, they are "a sequence of whitespace-separated JSON values which are passed through the provided filter one at a time" which is the relevant thing if you are going to try to replace jq.

Yep, kind of.

The comma operations means that the "filters" are duplicated, so instead of one json state you would pass two if there's one coma; and ofcourse any number of commas are allowed.

Re: Q: A faster re-implementaiton of jq written in Reason Native/OCaml

#196
post #143

Would be good if someone adds an explanation why this new approach is better, is it that the OCaml is faster, more efficient algorithms were used, etc?

I tried to explain it on the Performance section and on the report

https://github.com/davesnx/query-json#performance https://github.com/davesnx/query-json/blob/master/benchmarks...

But all explanations aren't based by any evidence, just asumptions.

Post reply on HN