This is to help understand formats discussed in today's XDI2 call so we can proceed further with design of formats. Corrections encouraged.
Existing description: display format
Suggested description: display format statement serialization
Low level data format: proprietary
Graph serialization approach: as list of statements (triples) containing full paths
Subject/context format: Composed as bare string; always required
Predicate format: Composed as bare string separated by /
Object format: Composed as as bare string or as JSON value
Repetition elimination: none, always use full addresses
Idempotence: Sequence of operations where result in graph can be overwritten by a following statement
Minimal example: 10 bytes
=s/=p/=o<LF>
Existing description: (original) JSON serialization
Suggested description: JSON S/P or S+P statement serialization (pronounced just as SP)
Low level data format: JSON
Graph serialization approach: as list statements (triples) containing full paths
Subject/context format: Composed as JSON string along with predicate
Predicate format: Composed as JSON string along with subject
Object format: Composed as JSON string
Repetition elimination: Can omit S/P if both exactly the same
Idempotence: Sequence of operations where result in graph can be overwritten by a following statement
Minimal example: 16 bytes
{"=s/=p":["=o"]}
Existing description: parse tree serialization
Suggested description: JSON parsed statement serialization
Low level data format: JSON
Graph serialization approach: as list of statements (triples) containing full paths
Subject/context format: Decomposed as JSON key per context symbol and JSON string value per corresponding identifier
Predicate format: Decomposed as JSON key per context symbol and JSON string value per corresponding identifier
Object format: Decomposed as JSON key per context symbol and JSON string value per corresponding identifier
Repetition elimination: None currently
Idempotence: Sequence of operations where result in graph can be overwritten by a following statement
Minimal example: 35 bytes
[[[{"=":"s"},{"=":"p"},{"=":"o"}]]]
Existing description: graph tree serialization
Suggested description: JSON context tree serialization
Low level data format: JSON
Graph serialization approach: Nodes and contextual arcs serialized as JSON tree structure. Relational and literal arcs as keys on subject node.
Subject/context format: Decomposed as JSON key per arc, key string contains both context symbol corresponding identifier
Predicate format: Composed as single JSON string
Object format: Composed as single JSON strong except if object is an inner graph; then inner graph's subject is decomposed.
Repetition elimination: All shared prefixes among all subjects are merged as part of tree; but no such merging for predicate and object. No separate definitions needed for contexts.
Idempotence: Represents state, not a sequence of operations
Minimal example: 26 bytes
{"=s":{"/":{"=p":["=o"]}}}
Existing description: XDI2 JSON format to represent XDI graph in Zephyr datastore:
Low level data format: JSON
Graph serialization approach: List of nodes each containing list of outgoing arcs and incoming arcs (please correct and improve)
Subject/context format: composed as single JSON string, but encoded as URL
Predicate format: single JSON string?
Object format: single JSON string?
Idempotence: Represents state, not a sequence of operations
Minimal example: add here