tree: 04df5156a2028bc4662bfc9df40c0f7fcf81ed02 [path history] [tgz]
  1. .classpath
  2. .project
  3. .settings/
  4. README.md
  5. pom.xml
  6. src/
moxy/twitter/README.md

EclipseLink MOXy Twitter Example

This example application demonstrates how to read JSON data into objects mapped with EclipseLink JAXB.

  • Using standard JAXB APIs, Result and SearchResults classes are mapped to a subset of the JSON data returned from a Twitter query
  • Query is executed by using a Twitter Search URL (e.g. http://search.twitter.com/search.json?q=jaxb)
  • Incoming JSON is unmarshalled to a SearchResult object
  • An new Result is manually created and added to the query results, which are then marshalled to System.out
  • This example also uses a DateAdapter to convert Twitter's timestamp format to a java.util.Date

To run this example, simply execute mvn from this directory, or run a Maven build in Eclipse.

http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JSON_Twitter