3 ms·
> You'd first have to sort the keys A lot of that comes down to internal application architecture. If you're working in Javascript / Typescript, where objects
by gwbas1c 5y ago
> You'd first have to sort the keys
A lot of that comes down to internal application architecture. If you're working in Javascript / Typescript, where objects are inherently dictionaries / hashsets with ordering; yes, this is true. You will need to sort before serialization in order for the diff to be useful.
But: If you're working in a strongly-typed language like C# / Java / Rust / C++, and using an object -> JSON -> object serializer; the order of the elements is often quite explicit and never changes.