public final class JsonToXmlExtensions
extends java.lang.Object
JsonToXmlExtensions helps to transform a given json string to an xml string.| Constructor and Description |
|---|
JsonToXmlExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
toXml(java.lang.String jsonString)
Transform the given json as
String object to an xml as String object. |
static <T> java.lang.String |
toXml(java.lang.String jsonString,
java.lang.Class<T> clazz)
Transform the given json as
String object to an xml as String object. |
public static java.lang.String toXml(java.lang.String jsonString)
throws org.json.JSONException
String object to an xml as String object.jsonString - the json as String objectString objectorg.json.JSONException - if there is a syntax error in the source string or a duplicated key.public static <T> java.lang.String toXml(java.lang.String jsonString,
java.lang.Class<T> clazz)
throws com.fasterxml.jackson.core.JsonParseException,
com.fasterxml.jackson.databind.JsonMappingException,
java.io.IOException
String object to an xml as String object.T - the generic typejsonString - the json as String objectclazz - the clazz of the generic typeString objectcom.fasterxml.jackson.core.JsonParseException - If an error occurs when parsing the string into Objectcom.fasterxml.jackson.databind.JsonMappingException - the If an error occurs when mapping the string into Objectjava.io.IOException - Signals that an I/O exception has occurred.