bnclabs/gson

JSON: Extending JSON for Query specification.

Opened this issue · 2 comments

When key used in a kv storage is shaped as JSON string, then we need some additional support besides what is available in JSON spec

  • Min-Unbounded, to denote that we want to iterate from the first item.
  • Max-Unbounded, to denote that we want to iterate till the last item.
  • -Infinity, to denote smallest number.
  • +Infinity, to denote largest number.
  • NaN, since it is included in IEEE 754 spec.
  • Missing, what is the sort position for missing in the supported list of types.

Terminator byte = 0
TypeMissing byte = 11
TypeNull byte = 12
TypeFalse byte = 13
TypeTrue byte = 14
TypeNumber byte = 15
TypeString byte = 16
TypeLength byte = 17
TypeArray byte = 18
TypeObj byte = 19
TypeBinary byte = 20

Creating a gap between Terminator and TypeNull, for more types that can be
included later on.

These representations can be added in collation binary format.
While some more analysis are required for JSON and CBOR.