I re-implementatied jq in Reason Native and OCaml and I’m a little proud , started as a way to learn how to write lexers/parsers/compilers with the OCaml stack, but ending up very functional.
I’m using it right now, every day. It’s called query-json or for short “q”.
It has better performance (between 2x and 5x) than jq, richer error messages and simplified API. It’s mostly thanks to OCaml/Reason, rather than my skill to code a compiler! Still isn’t feature complete, though, but have implemented most of the common functionality, Adding those features shouldn’t affect the performance, so I will keep adding them with time.
You can check the benchmarks here: https://github.com/davesnx/query-json#Performance
The main idea is to improve the api of the operations and errors with manipulation JSON files.
If you don’t know what jq is, check thoughtbot dot com/blog/jq-is-sed-for-json or programminghistorian dot org/en/lessons/json-and-jq.
Hope you like it and let me know if there’s something that you struggled with jq and I can make it better in q, let me know, I’m always open to any DM.
PS: The creator of jq (@stedolan), which is a current OCaml core maintainer is doing ocaml-multicore, which at some point could improve the “q” performance even more.