首页 > 其他 > 详细

【Other】关于There is a cycle in the hierarchy!

时间:2017-08-05 21:35:05      阅读:223      评论:0      收藏:0      [点我收藏+]

原因:

  父对象与子对象互相包含对方的类型的属性,造成死循环

解决方案1:

  JsonConfig config=new JsonConfig();

  config.setExcludes(new String[]{"devTask","employee","probClient"});  //传入要忽略的属性数组

  JSONObject json=JSONObject.fromObject(new Object(),config);    

 

  

  

 

  

 

【Other】关于There is a cycle in the hierarchy!

原文:http://www.cnblogs.com/LightChan/p/7291389.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!