Closed ghillairet closed 7 years ago
Current serializer will save key/value of a map entry as containment even if the key or value is defined as a reference.
Sample map definition with references.
class TMapRef wraps Map.Entry { refers PrimaryObject key refers TargetObject value }
will serialize as
{ "eClass": "http://www.emfjson.org/jackson/model#//ETypes", "valuesWithRef": [ { "key": { "eClass": "http://www.emfjson.org/jackson/model#//PrimaryObject", "name": "p1" }, "value": { "eClass": "http://www.emfjson.org/jackson/model#//TargetObject", "singleAttribute": "t1" } } ] }
but should instead contain references, something like
{ "eClass": "http://www.emfjson.org/jackson/model#//ETypes", "valuesWithRef": [ { "key": { "$ref": "p1" }, "value": { "$ref": "t1" } } ] }
:+1:
This has been fixed in RC1
Current serializer will save key/value of a map entry as containment even if the key or value is defined as a reference.
Sample map definition with references.
will serialize as
but should instead contain references, something like