// SectionModel sm = JSON.parseObject(sectionsString, SectionModel.class);java
return JSONObject.toJSONString(sm );json
JSONObject.toJSONString(对象);//对象转为json字符串spa
JSONObject articleLocal = JSONObject.parseObject(testString);//先把字符串转换为json对象 ArticleModel art = JSONObject.toJavaObject(articleLocal, ArticleModel.class);//再把json对象转为java对象
json转listcode
List<UserModel> users = InitdataBean.userModels;//获取一个对象列表 String userjson = JSONObject.toJSONString(users);//列表转json字符串 List<UserModel> userList = JSONObject.parseArray(userjson, UserModel.class);//字符串转对象列表