{"name":"Arnav","surname":"Rodrigues","gender":"male","region":"India"}
如何在JSP / Java中解析此JSON响应。
对于Ex:
Name: Arnav
Surname: Rodrigues
答案 0 :(得分:0)
String jsonStr = '{"name":"Arnav","surname":"Rodrigues","gender":"male","region":"India"}';
JSONObject myObject = (JSONObject) JSONValue.parse(jsonStr);
// myObject.name, myObject.surname, ...