/**
* json 解析
*/
@SuppressWarnings("rawtypes")
public static Map<String, Object> testJson(String json, int array_param, int obj_param, String str_null,
Map<String, Object> map) {
try {
JSONObject jsonObject = JSONObject.parseObject(json);
Iterator it = jsonObject.keySet().iterator();
String str_1 = "";
if (array_param == 0) {// 如果是第一个,那么为空
str_1 += "";
} else {
str_1 += str_null;
}
if (obj_param == 0) {
str_1 += "";
} else { // 如果不是第一个,那么都增加" "输出
str_1 += str_null;
}
str_null += str_1;
while (it.hasNext()) {
Object str =
将json字符串解析成map
最新推荐文章于 2023-10-12 11:57:12 发布