News for hackers. Stuff that matters.
Re:JSON Patch – a format for describing changes to a JSON do... by drostie on Thursday October 30, 2014 @01:29PM (#8534399)
You are correct, but if you control the environment enough to be doing this at all, then you control the environment enough to get the serialization consistent: either by having ordered dictionaries in the language a la Python and PHP, or implementing your own, or by sorting the keys lexicographically a la bencode.

That is, `diff(sorted_json_stringify(json_parse(p)))` will be adequate if `diff(p)` is not.

There are no comments on this comment yet.