public final class JSONConverter extends XMLConverter
This class converts a JSON document to XML. The converted XML document is both well readable and lossless, i.e., the converted document can be serialized back to the original JSON representation.
The specified JSON input is first transformed into a tree representation and then converted to an XML document, according to the following rules:
<json/> root node.<_>...</_>).__).
<value/> is used as element name.
type attribute.type
attribute will be omitted. Instead, the name will be listed in
additional, type-specific attributes in the root node. The attributes
are named by their type in the plural (numbers, booleans,
nulls, objects and arrays), and the attribute
value contains all names with that type, separated by whitespaces.input| Constructor and Description |
|---|
JSONConverter(InputInfo ii)
Constructor.
|
public JSONConverter(InputInfo ii)
ii - input infopublic ANode parse(byte[] q) throws QueryException
XMLConverterparse in class XMLConverterq - queryQueryException - query exception