This website requires JavaScript.
Explore
Help
Sign In
FGCOM
/
jansson
Watch
2
Star
0
Fork
0
You've already forked jansson
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
58f9d65535
jansson
/
test
/
suites
/
encoding-flags
/
preserve-order
/
env
2 lines
29 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Implement JSON_PRESERVE_ORDER encoding flag With this encoding flag, the object key-value pairs in output are in the same order in which they were first inserted into the object. To make this possible, a key of an object is now a serial number plus a string. An object keeps an increasing counter which is used to assign serial number to the keys. Hashing, comparison and public API functions were changed to act only on the string part, i.e. the serial number is ignored everywhere else but in the encoder, where it's used to order object keys if JSON_PRESERVE_ORDER flag is used.
2010-02-10 03:29:33 +08:00
export JSON_PRESERVE_ORDER=1
Reference in New Issue
Copy Permalink