Given an EGenericType, the EClassifier describing the actual data type to be serialized should be obtained via .getERawType() and not via .getEClassifier().
The previous behaviour resulted in some generic features not getting serialized at all, see the added test case for an example; without my change the test case would throw the following exception:
org.junit.ComparisonFailure:
Expected :{"eClass":"http://www.emfjson.org/jackson/generics#//OtherContainer","key":"key-123","content":{"eClass":"http://www.emfjson.org/jackson/generics#//ContentA","payload":"some-value"}}
Actual :{"eClass":"http://www.emfjson.org/jackson/generics#//OtherContainer","key":"key-123"}
Given an
EGenericType
, theEClassifier
describing the actual data type to be serialized should be obtained via.getERawType()
and not via.getEClassifier()
.The previous behaviour resulted in some generic features not getting serialized at all, see the added test case for an example; without my change the test case would throw the following exception: