hguven / jaql

Automatically exported from code.google.com/p/jaql
0 stars 0 forks source link

Retain field order in record schemata #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The fields in records are unordered in general, but we might want to store
a specific ordering of fields in the record schema. This ordering might be
exploited for pretty printing or, in general, serialization.

Original issue reported on code.google.com by Rainer.G...@gmx.de on 2 Dec 2009 at 10:37

GoogleCodeExporter commented 8 years ago
This issue involves updating the default printer for the jaqlshell to be 
schema-aware. 

Previously:
> { b: 1, a: 1 };
{
  "a": 1.
  "b": 1
}

Desired:
> { b: 1, a: 1 };
{
  "b": 1.
  "a": 1
}

Note that { a:1, b:1 } and { b:1, a:1 } are equal because record fields are
unordered; the old and desired outputs are thus equivalent. 

Original comment by Rainer.G...@gmx.de on 2 Dec 2009 at 10:40

GoogleCodeExporter commented 8 years ago
Committed r438.

Original comment by Rainer.G...@gmx.de on 2 Dec 2009 at 10:50