emfjson / emfjson-jackson

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

Introduce @JsonAlias annotation for deserialization #101

Closed janhicken closed 6 years ago

janhicken commented 6 years ago

Hi,

this PR introduces a new model annotation @JsonAlias similar to the one in Jackson used for deserialization. It allows to process a JSON attribute with an alias name, which is especially useful, when you want to rename an attribute while retaining schema compatibility.

Furthermore, I removed a code duplicate in EObjectPropertyMap by using EObject.getEAllStructuralFeatures and a type cast instead of iterating over EObject.getEAllAttributes and EObject.getEAllReferences separately.

ghillairet commented 6 years ago

@janhicken Thanks for the PR, it will be publish in a new release in a week at most.

janhicken commented 6 years ago

May I remind you about the release? :)

ghillairet commented 6 years ago

It has been released in 1.1.0