News for hackers. Stuff that matters.
Re:Jd – JSON Diff and Patch by Cu3PO42 on Monday September 09, 2024 @02:28AM (#41485951)
I have recently used jd with great success for some manual snapshot testing. At $work we did a major refactor of $productBackend, so I saved API responses into files for the old and new implementation and used jd (with some jq pre-processing) to analyze the differences. Some changes were expected, so a fully automatic approach wasn't feasible.

This uncovered a few edge cases we likely wouldn't have caught otherwise and I'm honestly really happy with that approach!

One thing I would note is that some restructurings with jq increased the quality of the diff by a lot. This is not a criticism of jd, it's just a consequence of me applying some extra domain knowledge that a generic tool could never have.

Re:Jd – JSON Diff and Patch by josephburnett on Monday September 09, 2024 @01:22PM (#41490929)
> I would note is that some restructurings with jq increased the quality of the diff by a lot.

I would really like to know more about these restructurings. Would you mind dropping me an example here or at https://github.com/josephburnett/jd/issues please? There are somethings I won't do with jd (e.g. generic data transformations) but I do plan to add some more semantic aware metadata with the v2 API.

Also, I'm glad this tool helped you! Made my day to here it :)