This feature would provide support for loading/serializing Object specific properties with no direct mapping in corresponding EClass.
For example if we have the following EClass:
The property name is mapped to the EAttribute name but the second property does have any equivalent and is
specific to this object.
A way to keep this information is to defined a Map.Entry in the EClass as this:
class User {
attr String[1] name;
@JSON(dynamicMap="true")
val ecore.EStringToStringMapEntry[*] entries;
}
This one is annotated with the @JSON annotation and have for key dynamicMap sets to true, it's name is arbitrary. This MapEntry will be use to store the Object dynamic properties, that could be access like this:
This feature would provide support for loading/serializing Object specific properties with no direct mapping in corresponding EClass. For example if we have the following EClass:
and following JSON Object:
The property name is mapped to the EAttribute name but the second property does have any equivalent and is specific to this object.
A way to keep this information is to defined a Map.Entry in the EClass as this:
This one is annotated with the @JSON annotation and have for key dynamicMap sets to true, it's name is arbitrary. This MapEntry will be use to store the Object dynamic properties, that could be access like this: