tree: 7b3421ec5d7160b56f1aa962012ff67392c51d5e [path history] [tgz]
  1. .classpath
  2. .project
  3. .settings/
  4. README.md
  5. output.html
  6. pom.xml
  7. src/
  8. style.css
moxy/social-binding/README.md

EclipseLink Social-Binding Example

This example will demonstrate how to use EclipseLink MOXyto work with public JSON and XML feeds using a declarative binding approach.

The following concepts are demonstrated:

  • Mapping to JSON and XML data without writing or generating concrete Java classes
  • Using multiple MOXy metadata files to modularize your metadata
  • Bootstrapping a DynamicJAXBContext from multiple MOXy metadata files
  • Using a single DynamicJAXBContext to read both JSON and XML data
  • Using DynamicEntity APIs to interact with mapped data
  • Using XPath Predicates to map to an attribute based on another attribute value
  • Using UnmarshallerProperties.JSON_INCLUDE_ROOT to read JSON that does not have a root element
  • Using Marshaller.JAXB_FRAGMENT to omit the XML preamble when writing

The example application uses Dynamic MOXy to read a JSON stream from Reddit, an XML stream from Flickr, and uses the data from both to create an HTML file.

http://wiki.eclipse.org/EclipseLink/Examples/MOXy/Dynamic/Flickr