// we are putting XStream into this Application's Context, since XStream is threadsafe
// and it is safe to share it across multiple threads. XStream is heavily used by our
// custom Representation implementation to support XML and JSON.
// create and configure XStream for JSON
XStream xstream = createAndConfigureXstream(new JsonOrgHierarchicalStreamDriver());
// for JSON, we use a custom converter for Maps
xstream.registerConverter(new PrimitiveKeyedMapConverter(xstream.getMapper()));
// put it into context