<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[Fastjson解析List对象时出现“$ref”:“$.data[0].children[0]”的问题]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[编程杂谈]]></category>
<pubDate>Sat, 18 Jun 2022 10:07:56 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	一、问题原因<br/>2、原因：后台传过去的json数据用了阿里的fastjson转换，但是解析list中引用的数据时，jvm会自动将其处理为“循环引用”，因此，也就出现了问题&#123;&quot; r e f &quot; : &quot; ref&quot;:&quot; ref&quot;:&quot;.data[0].children[0]&quot;&#125;，数据以引用的方式传给前台，前台却无法解析到那段引用的数据。<br/><br/>循环引用就是：当一个对象包含另一个对象时，fastjson就会把该对象解析成引用。<br/><br/>二、解决方案<br/>JSON.toJSONString(list,SerializerFeature.DisableCircularReferenceDetect)<br/><br/>用这种转换方式，把list替换成你要转换的数据就可以了。<br/>
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] Fastjson解析List对象时出现“$ref”:“$.data[0].children[0]”的问题]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>