This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new c84b745bb1 DisableCircularReferenceDetect for fastjson impl (#10447)
c84b745bb1 is described below
commit c84b745bb196f51cee304fa80c6821db9ea2d93d
Author: Albumen Kevin <[email protected]>
AuthorDate: Mon Aug 15 11:11:56 2022 +0800
DisableCircularReferenceDetect for fastjson impl (#10447)
---
.../src/main/java/org/apache/dubbo/common/json/impl/FastJsonImpl.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/common/json/impl/FastJsonImpl.java
b/dubbo-common/src/main/java/org/apache/dubbo/common/json/impl/FastJsonImpl.java
index fff944e8aa..e5b440c044 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/common/json/impl/FastJsonImpl.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/common/json/impl/FastJsonImpl.java
@@ -18,6 +18,8 @@ package org.apache.dubbo.common.json.impl;
import org.apache.dubbo.common.utils.ClassUtils;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+
import java.lang.reflect.Type;
import java.util.List;
@@ -45,6 +47,6 @@ public class FastJsonImpl extends AbstractJSONImpl {
@Override
public String toJson(Object obj) {
- return com.alibaba.fastjson.JSON.toJSONString(obj);
+ return com.alibaba.fastjson.JSON.toJSONString(obj,
SerializerFeature.DisableCircularReferenceDetect);
}
}