I'm using Java, and I have a String which is JSON:
{
"name" : "abc" ,
"email id " : ["abc@gmail.com","def@gmail.com","ghi@gmail.com"]
}
Then my Map in Java:
Map<String, Object> retMap = new HashMap<String, Object>();
I want to store all the data from the JSONObject in that HashMap.
Can anyone provide code for this? I want to use the org.json
library.
try this code :
Converting a JSON String to Map
Converting JSON Array to List
Display JSON of Any Format
Google.gson to HashMap.
Hope this will work, try this:
str, your JSON String
As Simple as this, if you want emailid,
Brief and Useful:
Thank @Vikas Gupta.