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

Sortable JSON #6

Closed
prataprc opened this Issue Dec 28, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@prataprc
Copy link
Member

prataprc commented Dec 28, 2018

When JSON is the document format for databases, there shall always be some
need to define PartialOrd and Ord for JSON formated values. More specifically
we may need to figure out the following details -

  • Sort order for different types - null, bool, number, string, array, object.
  • Sort order for bool - false values sort before true values.
  • Sort order for float
    • NaN sort before negative-infinity.
    • negative-infinity sort before all floating point values.
    • positive-infinity sort after all floating point values.
  • For Strings, Unicode sort order or binary sort order.
  • Should array size sort before array elements.
  • Should object size sort before object elements.
  • Minbound and Maxbound, especially useful when JSON is used in range queries.

prataprc added a commit that referenced this issue Jan 6, 2019

prataprc added a commit that referenced this issue Jan 7, 2019

@prataprc prataprc closed this in 14bfe2a Jan 7, 2019

@prataprc prataprc reopened this Jan 7, 2019

prataprc added a commit that referenced this issue Jan 7, 2019

prataprc added a commit that referenced this issue Jan 7, 2019

@prataprc prataprc closed this Jan 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment