Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: