Json转换成字符串,There is a cycle in the hierarchy解决办法
来源:互联网 发布:淘宝购物数据流程图 编辑:程序博客网 时间:2024/04/30 06:51
1、原因由于对象内部相互引用出现死循环,而导致的错误;解决办法,排除掉相关的可以导致循环引用的对象。
如下:
JsonConfig jsonConfig = new JsonConfig();jsonConfig.setJsonPropertyFilter(new PropertyFilter() {@Overridepublic boolean apply(Object source, String name, Object value) {Set<String> propertyNameList = new HashSet<String>();propertyNameList.add("itemQueryServiceClient");propertyNameList.add("uicExtraReadServiceClient");propertyNameList.add("shopReadService");propertyNameList.add("readServices");propertyNameList.add("bmQuali");if (propertyNameList.contains(name)) {return true;}return false;}});JSONObject jsonObject = JSONObject.fromObject(super.getPage(),jsonConfig);
0 0
- Json转换成字符串,There is a cycle in the hierarchy解决办法
- 使用JSONObject转换json数据报错:There is a cycle in the hierarchy!的解决办法
- 使用Json-lib转换json字符串出现There is a cycle in the hierarchy!时的解决方案
- json-lib There is a cycle in the hierarchy!
- JSON There is a cycle in the hierarchy异常
- There is a cycle in the hierarchy解决办法
- There is a cycle in the hierarchy解决办法
- json-lib出现There is a cycle in the hierarchy解决办法
- json-lib出现There is a cycle in the hierarchy解决办法
- json-lib出现There is a cycle in the hierarchy解决办法
- 关于json-lib There is a cycle in the hierarchy!问题的3种解决办法
- 黑马bos项目运行json时出现There is a cycle in the hierarchy!的解决办法
- json转换数据时候,报there is a cycle in the hierarchy!
- JSON 转换异常 死循环 There is a cycle in the hierarchy
- There is a cycle in the hierarchy
- There is a cycle in the hierarchy !!!
- There is a cycle in the hierarchy
- There is a cycle in the hierarchy
- Java中HashMap遍历的两种方式
- SQL*Loader sqlldr 极速导入模式
- E2034 Cannot convert 'void *' to 'HDROP__ *'
- Android中使用tcpdump抓取网络数据包
- 可以吗
- Json转换成字符串,There is a cycle in the hierarchy解决办法
- IOS开发调用系统相机和打开闪光灯
- 合并两个排序的链表
- xapian简介
- LockNote袖珍加密记事本(仅100K
- Object-C delegate 设计模式
- Improvement of AUTO sampling statistics gathering feature in Oracle 11g
- API之文本和字体函数
- 计算机网络--OSI模型