eclipse-emfcloud / emfjson-jackson

emfjson-jackson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Features should be (de)serialized by using the EFactory, not Jackson's built-in logic

hallvard opened this issue · comments

I have a model with a custom data type (for LocalDate) and I've implemented corresponding createFromString and convertToString methods in the generated EFactory. To my surprise, I got an Exception saying the java.time.LocalDate type isn't supported (without some extra the Jackson module). Looking at the code, it seems the model's factory isn't used at all. I agree that certain types that are native to JSON (boolean and numbers) can be handled specially, but in general emfjson should use the EFactory like the XML/XMI serialization works.

It should be possible to add an option for supporting both, but IMO the default should be to use the EFactory.

Sorry for the delayed reply. We gladly accept a PR for this.

Hi all,
we are also interested to get this realized. I have seen the PR #26.
What needs to be done, to get this ready? Maybe find time to help out.
Regards,
Mark

@maho7791 We basically miss the support for activating this feature through a dedicated option/annotation, see also PR #26.