Class JsonToXmlExtensions


  • public final class JsonToXmlExtensions
    extends java.lang.Object
    The class JsonToXmlExtensions helps to transform a given json string to an xml string.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String toXml​(java.lang.String jsonString)
      Transform the given json as String object to an xml as String object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toXml

        public static java.lang.String toXml​(java.lang.String jsonString)
                                      throws org.json.JSONException
        Transform the given json as String object to an xml as String object.
        Parameters:
        jsonString - the json as String object
        Returns:
        the transformed xml as String object
        Throws:
        org.json.JSONException - if there is a syntax error in the source string or a duplicated key.