json转map 怎么转
目前项目有个需求,导出json。我用的map<String,object> value放的是list。转成json后给对方,完事后还会传同样格式的json给我。
Map<String, Object> jsonMap = new HashMap<String, Object>();
jsonMap.put("eList", eList);
jsonMap.put("iList", iList);
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.setIgnoreDefaultExcludes(false);
jsonConfig.setExcludes(new String[]{"instruments","entrust"});
JSONObject jsonArray = JSONObject.fromObject(jsonMap,jsonConfig);
我是这么转的json,但是现在不会再转回来了。求教大神,怎么再把json转成map啊(就是再转成我最开始的那样,value是list的)。
Map<String, Object> jsonMap = new HashMap<String, Object>();
jsonMap.put("eList", eList);
jsonMap.put("iList", iList);
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.setIgnoreDefaultExcludes(false);
jsonConfig.setExcludes(new String[]{"instruments","entrust"});
JSONObject jsonArray = JSONObject.fromObject(jsonMap,jsonConfig);
我是这么转的json,但是现在不会再转回来了。求教大神,怎么再把json转成map啊(就是再转成我最开始的那样,value是list的)。
...全文
相关推荐
json工具类,json转对象转map对象转json
json工具类,json转为对象,json转map。对象转json。便于使用
Map转JSON的jar包
Map转JSON的所有jar包,含使用说明
java对象List,Map转json格式
java对象转为json格式,同javascript进行数据交换。
json转map实例
json转map实例
map转json所需jar集合
map转json所需jar集合,map转json出现异常,原因是少了JAR包,造成类找不到,除了要导入JSON网站上面下载的json-lib-2.1.jar包之外,还必须有其它几个依赖包: commons-beanutils.jar,commons-httpclient.jar,commons-lang.jar,ezmorph.jar,morph-1.0.1.jar,把里面的包都加上就没事了


Web 开发
