我向服务器发送JSON
数据,服务器返回JSON
数据。如何将返回的数据保存为JSONArray
?返回值在'responce'变量中,如何将此响应保存为JSONArray
。我需要使用返回的JSONArray
来更新我的数据库。
这是我的JSON
,
[{
"_id": "1",
"name": "Sss",
"dob": "10/1/2000",
"gender": "Male",
"mobile": "123456780",
"address": "asdas"
}]
答案 0 :(得分:1)
JSONArray jsonArray = new JSONArray();
jsonArray.put(responce); //don't blame for typo of responce