Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (10.2k points)

What are some good tools for quickly and easily converting XML to JSON in Java?

1 Answer

0 votes
by (46k points)

To convert XML File in to JSON include the following dependency

<dependency>

    <groupId>org.json</groupId>

    <artifactId>json</artifactId>

    <version>20140107</version>

</dependency>

and you can Download Jar from Maven Repository here. Then implement as:

String soapmessageString = "<xml>yourStringURLorFILE</xml>";

JSONObject soapDatainJsonObject = XML.toJSONObject(soapmessageString);

System.out.println(soapDatainJsonObject);

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 18, 2019 in Java by Shubham (3.9k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...