Json: JSONException: UserNm 没有值

Json: JSONException: No value for UserNm

我在从 PHP 文件

收到的 JSON 文件中提取数据时遇到问题

这是 JSON 文件的文件内容 get:

{"success":1,"message":"Data of the Person", "0":{"Name":"Marco","Surname":"Rossi","Age":"32"}}

我尝试使用 getString 函数,但它给了我错误 JSONException: No value for lane_prodoct

这是我用来恢复数据的函数的摘录:

success = jObj.getString("success");
UserNm = jObj.getString("Name");
UserSrm = jObj.getString("Surname");
UserAge= jObj.getString("Age");

JSON

{"success":1,"message":"Data of the Person", "0":{"Name":"Marco","Surname":"Rossi","Age":"32"}

这里最后一个 } 不见了。 应该是

{"success":1,"message":"Data of the Person", "0":{"Name":"Marco","Surname":"Rossi","Age":"32"}}