1* codec.Encode() converts the input JSON to golang native before
2  applying the encoding algorithm,
3    if err := json.Unmarshal(text, &m); err != nil {
4        return nil, err
5    }
6  explore possibilities to avoid a call to json.Unmarshal()
7
8* codec.Decode() returns JSON output, for couchbase 2i project
9  the JSON string will always the following JSON format.
10        [expr1, docid] - for simple key
11        [expr1, expr2, ..., docid] - for composite key
12  it would be a good optimization to implement a variant of Decode()
13  that will return as,
14        [expr1], docid - for simple key
15        [expr1, expr2 ...], docid - for composite key
16
17* Jens' comments,
18  * Also BTW, there’s a lot of appending of byte slices going on in
19    collate.go. I suspect this is inefficient, allocating lots of small slices
20    and then copying them together. It’s probably cheaper (and simpler) to use
21    an io.Writer instead.
22  * The CouchDB collation spec uses Unicode collation, and strangely enough
23    the collation order for ASCII characters is not the same as ASCII order. I
24    solved this by creating a mapping table that converts the bytes 0-127 into
25    their priority in the Unicode collation.
26
27* create a new directory examples_len/ that contains the sorted list of json
28  items without using `lenprefix`
29
30* Are we going to differentiate between float and integer ?
31  Looks like dparval is parsing input json's number type as all float values.
32
33* JSON supports integers of arbitrary size ? If so how to do collation on
34  big-integers ?
35  Even big-integers are parsed are returned as float by dparval.
36
37* Encoding and decoding of utf8 strings.
38