-
-
Notifications
You must be signed in to change notification settings - Fork 313
Make ordering of keys consistent #641
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
Comments
It would seem to me that, if order matters, ... with the exception of $id, so I could be persuaded otherwise. |
While I understand the motivation of this (and agree somewhat), it feels weird to me that the sequence of keys in a key-value pair collection matters. The entire purpose of having the key-value paradigm is to get around requiring order and allow easy access to the values. Furthermore JSON declares that while arrays are to be considered "ordered" (or, more properly, "sequenced"), objects are not. This may cause confusion with authors and consumers. @retrosight are you asking for this to help with schema equality comparisons, or do you have another purpose? |
See also #538 & #475 |
Yes, I understand order does not matter to the computers. ;-) I'm looking for the consistency to aid learning while reading between different schemas. The reader doesn't have to context switch the order. |
I have no issue with ordering the meta schemas we provide. PR welcome. |
I'm fine with this- order (as it relates to our published meta-schemas and whatnot) should be:
I just updated all of the meta-schemas in a PR. I'm not 100% sure I got all of them in the same order, it's late so I'll look at it tomorrow or anyone else feel free to comment on PR #714 |
It's the little details that matter in life -- we love consistency, so let's bring it to all of the schemas.
One example of many...
The text was updated successfully, but these errors were encountered: