Package com.dslplatform.json
Class XmlConverter
java.lang.Object
com.dslplatform.json.XmlConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final DocumentBuilderprivate static final JsonReader.ReadObject<Element> private static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidbuildCDataList(Document doc, Node subtreeRoot, List<String> nodeValues) private static voidbuildCommentList(Document doc, Node subtreeRoot, List<String> nodeValues) private static voidbuildTextNodeList(Document doc, Node subtreeRoot, List<String> nodeValues) private static voidbuildXmlFromHashMap(Document doc, Element subtreeRootElement, Object elementContent) private static voidbuildXmlFromJsonArray(Document doc, Node listHeadNode, List<Object> elementContentList) private static Documentstatic Elementdeserialize(JsonReader reader) deserializeCollection(JsonReader reader) static voiddeserializeCollection(JsonReader reader, Collection<Element> res) static voiddeserializeNullableCollection(JsonReader reader, Collection<Element> res) static Element(package private) static <T> voidregisterDefault(DslJson<T> json) static voidserialize(Element value, JsonWriter sw) static voidserializeNullable(Element value, JsonWriter sw)
-
Field Details
-
READER
-
documentBuilder
-
TEXT_NODE_TAG
- See Also:
-
COMMENT_NODE_TAG
- See Also:
-
CDATA_NODE_TAG
- See Also:
-
-
Constructor Details
-
XmlConverter
public XmlConverter()
-
-
Method Details
-
registerDefault
-
serializeNullable
-
serialize
-
deserialize
- Throws:
IOException
-
mapToXml
- Throws:
IOException
-
createDocument
-
buildXmlFromHashMap
-
buildTextNodeList
-
buildCDataList
-
buildCommentList
-
buildXmlFromJsonArray
-
deserializeCollection
- Throws:
IOException
-
deserializeCollection
public static void deserializeCollection(JsonReader reader, Collection<Element> res) throws IOException - Throws:
IOException
-
deserializeNullableCollection
public static ArrayList<Element> deserializeNullableCollection(JsonReader reader) throws IOException - Throws:
IOException
-
deserializeNullableCollection
public static void deserializeNullableCollection(JsonReader reader, Collection<Element> res) throws IOException - Throws:
IOException
-