Hi Ezra, JiBX uses a wrapper around the parser to make it (relatively) easy to use alternatives. Besides the build-in XMLPull and StAX parser support, I've recently implemented a wrapper for my XBIS encoding, for instance.
The interface you need to implement is org.jibx.runtime.IXMLReader. Since you probably won't have any use for namespaces, you can basically stub out the namespace-related methods. You can then set the IXMLReader instance on your marshalling context using the setXmlWriter() method. - Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Ezra Epstein wrote: > I'm wondering whether - and how - I can substitute a different parser for > the built-in XPP3. > > My use case: > + I've got JiBX working and parsing to/from the mapped XML. > + I want to add support for JSON without adding a set of JSON bindings. > + Jettison ( http://jettison.codehaus.org/ ) seems a great, easy > option: I can piggy back on the existing XML mappings and just use Jettison > to make the JSON stream available via and XML StAX parser API. > Conceptually very slick. > > My fall-back is a two-stage conversion: JSON -> XML -> Java but I'd rather > skip the XML middle-man. > > So what's the steps to specify a different "XML" parser when using JiBX to > unmarshall? > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users