graph != tree
Since we may start writing more concrete examples, possibly in YAML #122, I think we should keep in mind the graph structure of data and avoid seeing it as tree. For example @ahdinosaur wrote snippet:
'@type': vf:Transportation
resource: ex:resource/those-delicious-crates-of-apples-i-got-while-dumpster-diving
dimension: 20
start: ex:locations/the-zig-zag
end: ex:locations/the-lowlands
process:
'@type': vf:Process
inputs:
- '@type': vf:Consume
resource: ex:resources/coop-petrol
dimension: 1 L
- '@type': vf:Use
resource: ex:resource/coop-vehicle
dimension: 1
we should consider it equal to
'@type': vf:Process
inputs:
- '@type': vf:Consume
resource: ex:resources/coop-petrol
dimension: 1 L
- '@type': vf:Use
resource: ex:resource/coop-vehicle
dimension: 1
'@reverse':
process:
'@type': vf:Transportation
resource: ex:resource/those-delicious-crates-of-apples-i-got-while-dumpster-diving
dimension: 20
start: ex:locations/the-zig-zag
end: ex:locations/the-lowlands
Both after parsing will have identical internal representation (in particular runtime) and when serialized using RDF Dataset Normalization will produce identical documents with the same checksum (hash). If someone needs particular shape of JSON, than one can use JSON-LD Framing but in my opinion we shouldn't privilege any particular frame and always rely directly on the structure of represented graph.