In a previous post I introduced EclipseLink JAXB (MOXy)'s @XmlVariableNode extension. In this post I'll demonstrate how @XmlVariableNode could be leveraged to handle an interesting question I came across on Stack Overflow. In that question instead of a collection being represented with an element that appeared multiple times, the element name contained the index. While I would never recommend structuring your XML document this way sometimes you encounter it and need to be able to map it.
Showing posts with label XmlVariableNode. Show all posts
Showing posts with label XmlVariableNode. Show all posts
June 21, 2013
June 19, 2013
MOXy's @XmlVariableNode - Using a Map's Key as the Node Name
People often ask me how they can map a java.util.Map such that the keys become the node names. In this post I will demonstrate how this can be done using the new Variable Node mapping that we have added in EclipseLink MOXy.
You can try this out today using a nightly build of EclipseLink 2.6.0:
You can try this out today using a nightly build of EclipseLink 2.6.0:
Labels:
EclipseLink,
EclipseLink 2.6,
JSON,
Map,
MOXy,
XmlAdapter,
XmlVariableNode
June 17, 2013
MOXy's @XmlVariableNode - JSON Schema Example
We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy. To accomplish this we have created a new Variable Node mapping. In this post I will demonstrate the new mapping by mapping a Java model to a JSON Schema.
You can try this out today using a nightly build of EclipseLink 2.6.0:
You can try this out today using a nightly build of EclipseLink 2.6.0:
Labels:
EclipseLink,
EclipseLink 2.6,
Extension,
JSON,
MOXy,
XmlVariableNode
Subscribe to:
Comments (Atom)