Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add option "serializeAlphabetically" #42

Closed
jhorbulyk opened this issue Jul 8, 2019 · 0 comments · Fixed by #43
Closed

Proposal: Add option "serializeAlphabetically" #42

jhorbulyk opened this issue Jul 8, 2019 · 0 comments · Fixed by #43

Comments

@jhorbulyk
Copy link
Contributor

Currently, by default when serializing an object from json to hjson, the keys of the object are printed out in the order produced by Object.keys() which isn't particularly deterministic. (Or more precisely it is deterministic based on the order in which keys are populated.) However, it is often useful to have hjson keys rendered in a deterministic ordering such as the ordering producted by sort().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant