stringç±»åå¦æè¦è½¬æ¢æjsonçè¯ï¼å°±éè¦åæè¿æ ·çå½¢å¼ï¼å¦ä¸ï¼
String jsonStr ="{'id':'11','parentId':'root','refObj':{'existType':'exist','deptType':'emp','treeNodeType':'dept'}}";
JSONObject jsonObj = new JSONObject(jsonStr);
JSONObject refObj = new JSONObject(jsonObj.getString("refObj"));
String existType = refObj.getString("existType");
System.out.println(existType);
jar使ç¨çæ¯org.json.jar
温馨提示:答案为网友推荐,仅供参考