net.sf.json.JSONException: There is a cycle in the hierarchy! 异常解决

前端之家收集整理的这篇文章主要介绍了net.sf.json.JSONException: There is a cycle in the hierarchy! 异常解决前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. JsonConfig jsonConfig = new JsonConfig();
  2. jsonConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT);
  3. jsonConfig.registerJsonBeanProcessor(java.sql.Date.class,new JsDateJsonBeanProcessor());
  4.  
  5. JSONArray jsonObject = JSONArray.fromObject(list,jsonConfig);



解决该异常出现

猜你在找的Json相关文章