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

Does not preserve json property order #32

Open
joeflateau opened this issue Mar 7, 2019 · 2 comments
Open

Does not preserve json property order #32

joeflateau opened this issue Mar 7, 2019 · 2 comments

Comments

@joeflateau
Copy link

Json objects in logs have their properties reordered alphabetically instead of as logged.

Log

{ "b":1, "c":1, "a":1 }

Will print

{ "a":1, "b":1, "c":1 }
@unsign3d
Copy link

unsign3d commented Apr 3, 2019

I don't know if it's a bug or a feature to be honest.

The problem is in https://github.com/TylerBrock/colorjson, tl;dr it's an expected behaviour of that Marshaller to reorder the keys.

@TylerBrock it could be a nice feature for colorjson to have a flag for reorder or not (it could improve performance on big JSON) and you could put it also as a config flag here

@unsign3d
Copy link

unsign3d commented Apr 3, 2019

@TylerBrock if it's considered a bug (or a nice enhancement) I would like to work on it on both projects

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