users@jersey.java.net

[Jersey] Re: Jersey with Jackson for JSON

From: charlesk <charlesk40_at_yahoo.com>
Date: Sat, 18 Jun 2011 08:41:53 -0700 (PDT)

Svn,
I think you can use JaxbContext class to do that unmarshalling.

Something like:

JAXBContext jc = JAXBContext.newInstance("myPackageName");
//Create unmarshaller
Unmarshaller um = jc.createUnmarshaller();
//Unmarshal XML contents of the file myDoc.xml (or JSON) into your Java
  object instance.
MyJAXBObject myJAXBObject = (MyJAXBObject)
um.unmarshal(new java.io.FileInputStream( "myDoc.xml" ));

--
View this message in context: http://jersey.576304.n2.nabble.com/Jersey-with-Jackson-for-JSON-tp6480924p6491027.html
Sent from the Jersey mailing list archive at Nabble.com.