@Test
public void testParseArray() throws Exception {
String xml = convertToXml("[{\"name\":\"smith\"},{\"skill\":\"java\"}]", new JsonXmlReader(null, false, "elem"));
Diff diff = XMLUnit.compareXML("<elem><elem><name>smith</name></elem><elem><skill>java</skill></elem></elem>", xml);
assertTrue(diff.toString(), diff.similar());
}
@Test
public void testParseArrayOfObjects() throws Exception {
String xml = convertToXml("{\"equipments\":[{\"type\":\"charger\",\"cost\":\"1$\"},{\"type\":\"battery\",\"cost\":\"2$\"}]}", new JsonXmlReader());