Skip to content
Advertisement

Tag: json-simple

How to add subnode to json file using json-simple

I create json file with the folloing code: OUTPUT: How can I add content of java map to the this json output as a new node sothat I have at the end the following output: Answer You just need to add another object of type JsonObject and it will do that And that will return the output what you want

Store JSON data in Java

I want to learn JSON data storage in Java using Eclipse, so I googled a lot. I found JSON.simple and GSON. Are those a good choice? I went to Properties >> Java Build Path >> Add External JARs. I added json-simple-1.1.1.jar and google-gson-2.2.4-release.zip. Is it right? Where is the JavaDoc located? Main problem concerns an example found here: JSON.simple example

Advertisement