java Map 转换成 json 串
Map<String ,String> jsonString = new LinkedHashMap<>();
jsonString.put("loginName",loginName);
jsonString.put("loginPwd",loginPwdCode);
String jsonLogin = JSONUtils.toJSONString(jsonString);
json 串 转 map
Map jsonMap = (Map) JSONObject.parse(result);
Integer flag = 0;
for (Object map : jsonMap.entrySet()){
String key = (String)((Map.Entry) map).getKey();
if("code".equals(key)){
Integer code = (Integer) ((Map.Entry) map).getValue();
String number = code + "";
if("1000".equals(number)){
flag = 1;
}
}
}