Java: 8
, 2 dependencies (JUnit
, Annotations
)
<dependency>
<groupId>by.grodno.krivosheev</groupId>
<artifactId>converter</artifactId>
<version>RELEASE</version>
</dependency>
String jsonStr = "{\"key\":\"value\"}";
JsonObject jsonObj = new JsonObject(jsonStr);
String xmlStr = "<key>VALUE</key>";
XmlObject xmlObj = new XmlObject(xmlStr);
String jsonStr = "{\"key\":\"value\"}";
JsonObject jsonObj = new JsonObject(jsonStr);
XmlObject xmlObj = Converter.jsonToXml(jsonObj);
String xmlStr = "<key>VALUE</key>";
XmlObject xmlObj = new XmlObject(xmlStr);
JsonObject jsonObj = Converter.xmlToJson(xmlObj);