June 21, 2013

Mapping Bad XML - Enumerated Collection Elements

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.

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:

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:

June 12, 2013

MOXy is the New Default JSON-Binding Provider in GlassFish 4

GlassFish 4 is now available offering the complete Java EE 7 (JSR-342) platform.  EclipseLink made some major contributions to this release.  The first is providing the JPA 2.1 (JSR-338) implementation.  The second which I'll cover in this post is EclipseLink MOXy is now the default JSON-binding provider for JAX-RS applications.