字符串:
{"code":"1004","msg":"请先添加系统靠勤人员信息!","userRegistInfo":{"acc":"小谷","id":0,"phoneMac":"","phoneNum":"手机号码是:15555215554","phoneSin":"000000000000000","pwd":"e10adc3949ba59abbe56e057f20f883e","registerId":"","status":""}}
JSONObject jsonObject = new JSONObject(result);
String code = jsonObject.getString("code");
code就是key,获取后就是1004
原文链接:/json/289843.html