http://www.cnblogs.com/hoojo/archive/2011/04/22/2024628.html
对象转json
需要的架包 jackson-core-2.2.0.jar jackson-annotations-2.2.0.jar jackson-databind-2.2.0.jar 百度云下载链接 : 链接:https://pan.baidu.com/s/1o8onyRo 密码:jhdk ObjectMapper mapper = new ObjectMapper(); String json=mapper.writeValueAsString(对象); 字符串转json : JSON.parse(字符串);