[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: JSON parse tree serialization
Version 3: Using the context symbol/function itself as the key, and body as the value. This is even less bulky and more human-readable, and I like it better than #1 and #2. I've added [ ] around the predicate as Markus corrected to indicate that the predicate segment is a list containing one segment. The object might also be further wrapped, depending on whether we want to allow a bare JSON value as object and if this would be ambiguous or complicated. [ [ { "=":"drummond" }, { "<":{ "+":"email" } }, { "!":"uuid:f81d4fae-7dec-11d0-a765-00a0c91e0001" }, { "<<":{ "$":"string" } } ], [ { "<":"" } ], "dsr@ex1.com" ] Compact version: [[{"=":"drummond"},{"<":{"+":"email"}},{"!":"uuid:f81d4fae-7dec-11d0-a765-00a0c91e0001"},{"<<":{"$":"string"}}],[{"<":""}],"dsr@ex1.com"] The compact version is only about 1.5x as long (in characters) as the original XDI display format version: =drummond<+email>!uuid:f81d4fae-7dec-11d0-a765-00a0c91e0001<<$string>>/<>/ Version 4: Instead of object {"cs":"id"} use a list ["cs","id"]. This actually does not save any characters compared to Version 3, and would be more monotonous to read with only square brackets, so I would rather stick with version 3. On Apr 5, 2013, at 9:08 AM, Joseph Boyle <joseph@planetwork.net> wrote:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]