ghillairet/emfjson — Issue #8: Assignment of non containment references fails during loading from json
Author: ghillairet
Created: 2012-01-31 10:59:43+00:00
State: open

Loading of the following json will resolve objects references correctly,
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "root",
"target": {
"$ref": "#//@child.1/@child.0"
},
"child": [
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "n1"
},
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "n2",
"child": [
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "n12"
}
]
}
]
}

while this one will fail:
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "root",
"target": {
"$ref": "#//@child.1/@child.0"
},
"child": [
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "n1"
},
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "n2",
"child": [
{
"eClass": "http://www.eclipselabs.org/emfjson/junit#//Node",
"label": "n12",
"target":{
"$ref": "#/@child.1"
}
}
]
}
]
}