Package com.thoughtworks.xstream.io

Examples of com.thoughtworks.xstream.io.HierarchicalStreamDriver


   * @param json
   *            the json string
   * @return the string as xml.
   */
  public static String fromJSONtoXML(String json) {
    HierarchicalStreamDriver driver = new JettisonMappedXmlDriver();
    StringReader reader = new StringReader(json);
    HierarchicalStreamReader hsr = driver.createReader(reader);
    StringWriter writer = new StringWriter();
    try {
      new HierarchicalStreamCopier().copy(hsr, new PrettyPrintWriter(
          writer));
      return writer.toString();
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.io.HierarchicalStreamDriver

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.