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

Order JSON nodes more reliably #618

Open
aripollak opened this issue Feb 12, 2015 · 4 comments
Open

Order JSON nodes more reliably #618

aripollak opened this issue Feb 12, 2015 · 4 comments

Comments

@aripollak
Copy link

This was originally opened as #171 but was closed based on the assumption that hashes are inherently unordered. However, the Hash class in recent versions of Ruby automatically keeps track of key insertion order by default, so in theory this should be easier to implement now.
Rails' to_json orders things consistently, so it would be nice if rabl did too. It's easier to work with JSON output that's deterministically ordered for testing purposes, so that e.g. fixture files don't show differences with every new run.

@tibbon
Copy link

tibbon commented Feb 4, 2016

+1

3 similar comments
@pibo
Copy link

pibo commented May 30, 2016

+1

@marine44
Copy link

+1

@sskylar
Copy link

sskylar commented Nov 10, 2016

+1

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

5 participants