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

Consider using sort_keys=True for replicability in JSON #2

Open
Aareon opened this issue Jul 25, 2018 · 2 comments
Open

Consider using sort_keys=True for replicability in JSON #2

Aareon opened this issue Jul 25, 2018 · 2 comments

Comments

@Aareon
Copy link

Aareon commented Jul 25, 2018

json.dump(wallet, fp)

@hclivess
Copy link
Member

Hi, which JSON? Default implementation of JSON does not support unsorted keys?

@Aareon
Copy link
Author

Aareon commented Jul 30, 2018

@hclivess right now the current usage creates an unsorted string containing the JSON. With sort_keys enabled, the JSON will be sorted alphabetically by key. This is generally preferred as unsorted JSON doesn't work well in cryptocurrency. In this case, it may work fine, but as a future note, I would suggest sorting keys.

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

No branches or pull requests

2 participants