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
Advertisement
Tag: json-simple
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 …
Advertisement