java xml 转 json

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20170516</version>
            </dependency>

  

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

  

原文地址:https://www.cnblogs.com/Googler/p/7613855.html