Package org.sonatype.plexus.rest.xstream.json

Examples of org.sonatype.plexus.rest.xstream.json.PrimitiveKeyedMapConverter


  public static XStream getJsonXStream() {
    XStream jsonXStream = new XStream(new JsonOrgHierarchicalStreamDriver());

    // for JSON, we use a custom converter for Maps
    jsonXStream.registerConverter(new PrimitiveKeyedMapConverter(jsonXStream.getMapper()));

    initXStream(jsonXStream);
    return jsonXStream;
  }
View Full Code Here


    // 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
    getContext().getAttributes().put(JSON_XSTREAM, xstream);

    // create and configure XStream for XML
View Full Code Here

TOP

Related Classes of org.sonatype.plexus.rest.xstream.json.PrimitiveKeyedMapConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.