emfjson / emfjson-jackson

JSON Binding for Eclipse Modeling Framework
https://emfjson.github.io
Other
80 stars 23 forks source link

Fix generics with type bounds not getting serialized #103

Closed janhicken closed 6 years ago

janhicken commented 6 years ago

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"}
ghillairet commented 6 years ago

Thanks it's been published in 1.2.0.