Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSON as a serialization format for ModelInfo #640

Closed
brynrhodes opened this issue May 10, 2021 · 5 comments · Fixed by #745
Closed

Support JSON as a serialization format for ModelInfo #640

brynrhodes opened this issue May 10, 2021 · 5 comments · Fixed by #745

Comments

@brynrhodes
Copy link
Member

The translator currently only supports XML deserialization of model info, which means there is not a good story for deserialization of model info files in the Android space, which effectively prevents the translator from being used in an Android environment.

@fredhersch
Copy link

@brynrhodes Is this still open? Or now resolved?

@vitorpamplona
Copy link
Contributor

Folks, I am going to need this. So, how should this be done?

Should the project abandon the XML representation to use JSON only or is the project sustaining both?

@brynrhodes
Copy link
Member Author

Hi @vitorpamplona , we can't abandon it but we can restructure the dependencies, that's the next step here, to separate out the "hardcoded" nature of the modelinfo loading and make sure we can do it dynamically. One easy thing we can try (and I just haven't yet) is to see if the Jackson library actually can deserialize the XML modelinfo. Modelinfo is a much simpler structure, so it may just work (The reason we can't use the ELM XML is because it has the JAXB dependencies, not because we can't deserialize XML at all, right?)

@vitorpamplona
Copy link
Contributor

vitorpamplona commented May 3, 2022

I am happy to report that it largely works (with some tweaks). But I am having a hard time figuring out what is wrong with the USCore and QICore packages. See PR #745

Screen Shot 2022-05-03 at 5 26 33 PM

@vitorpamplona
Copy link
Contributor

vitorpamplona commented May 4, 2022

All good! PR #745 is ready for a review.

Noticed that:
1 - There were typos on the modelinfo files: primaryCocdePath and primaryCOdePath (Jackson XML is case sensitive)
2 - There is a bug that requires xsi:type to be the first property on XML elements with polymorphic nested objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants