Examples of HierarchicalStreamDriver


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
Copyright © 2018 www.massapi.com. 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.