I was responding to @gasche 's original problem. There, the issue is to construct some cut-down data-structure from the original full sexp/JSON. In an earlier comment in this thread, I mentioned that I’d written an OCaml implementation of @stedolan 's jq
; so did someone else: Query-json: Re-implemented jq in Reason Native/OCaml ) ; two thoughts:
- this would allow the query-engine to produce an OCaml JSON value
- at least when I wrote my interpreter, it was straightforward to imagine how to produce instead a code-generator, which could easily be converted into a PPX.