I have Json String array ,which looks like this ,
{ {name:"214",value:true,Id:0},
{name:"215",value:true,Id:0},
{name:"216",value:true,Id:0}
}
and want to covert this string to Json array object and iterate the list to read each object's value. Then set values to corresponding dto and save it . But i didnt find any good way to convert normal JSON array string to json array object.
I am not using google json , I want it to be done in normal json itself .Please help me
and java class i want something like this
JSONObject[] jsonObjectList = String after convert();
for (JSONObject jsonObject : jsonObjectList) {
System.out.println(" name is --"+jsonObject.get("name"));
System.out.println(" value is ---"+jsonObject.get("value"));
System.out.println(" id is ----"+jsonObject.get("id"));
}