Skip to content

Preserve order and numeric precision for JSON input

Compare
Choose a tag to compare
@bruceadams bruceadams released this 03 Jan 13:05
· 8 commits to main since this release

This is fairly subtle. When explicitly choosing json input with the --json option, yj now preserves the order of keys in objects (it had been sorting them alphabetically) and preserves full numeric precision.

For the default input of yaml, order has always been preserved and numeric precision is not preserved. Numerics are converted into integer or float internally then output in the standard format for integer or float.