3 ms·
Go will serialize keys to maps in random order, meaning that unless you take special and extraordinary precautions while serializing your json structs, you will
by vsnf 4y ago
Go will serialize keys to maps in random order, meaning that unless you take special and extraordinary precautions while serializing your json structs, you will get keys that will not be where you expect them to be.
- rektide 4y agoThis does not appear to be true[1][2]. [1] https://github.com/golang/go/issues/24415 https://github.com/golang/go/issues/24415 [2] https://go.dev/play/p/nXLs0hd8Uj3 https://go.dev/play/p/nXLs0hd8Uj3