ghillairet/emfjson — Issue #3: Add support for json referencing
Author: ghillairet
Created: 2011-10-21 13:10:52+00:00
State: open

Json referencing as described in dojo documentation [1] offers a way to link json objects. The reference is done via
a property named '$ref' with value the referenced object's id.
EmfJs will support json referencing a la dojo to serialize references between objects. For example two emf objects of
type User are linked by a non containment reference friends like this u1:User -friends-> u2:User have to be translated in
the following json:
[ {"id": 1, friends:{"$ref" : 2}}, {"id": 2} ]

Also this json referencing format will be use to create emf objects reference during parsing of json data.

[1] http://www.sitepen.com/blog/2008/06/17/json-referencing-in-dojo/