<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
</dependency>
System.out.println(org.json.XML.toJSONObject("<note>\n" + "<to>Tove</to>\n" + "<from>Jani</from>\n"
+ "<heading>Reminder</heading>\n" + "<body>Don't forget me this weekend!</body>\n" + "</note>")
.toString());