jaq icon indicating copy to clipboard operation
jaq copied to clipboard

jaq-json: implement `serde::Deserialize` for `jaq_json::Value`

Open jakobhellermann opened this issue 2 months ago • 4 comments

I'm building a tool that lets you search through unity game objects using jq at https://github.com/jakobhellermann/uniscan/

With this change, I can directly deserialize the internal game files directly into jaq_json::Value and query them, without going through an intermediate format.

I gated this behind a feature, but looking at it now I'm not sure that it is necessary. It doesn't introduce any new dependencies and I can't imagine the code adds that much to compile times.

jakobhellermann avatar Oct 20 '25 11:10 jakobhellermann

Hi @jakobhellermann, that looks already quite good!

It's a very good thing that you gated this behind a feature, because as far as I can see, it does add a dependency on serde, which one should be able to disable.

Could you add some tests to jaq-json for this new functionality?

01mf02 avatar Oct 20 '25 13:10 01mf02

Cool tool, by the way (uniscan). :)

01mf02 avatar Oct 20 '25 13:10 01mf02

Thanks :)

I've addressed the comments (in the other PR as well).

jakobhellermann avatar Oct 23 '25 14:10 jakobhellermann

Hi @jakobhellermann, thanks for your improvements.

Still, I do not see any tests for your code yet. Tests are important to me, otherwise I cannot refactor fearlessly. One function or so in your serde.rs with #[test] where you run through all your code paths would suffice.

01mf02 avatar Oct 28 '25 08:10 01mf02