我有这段代码:执行此代码时页面出错。我试图弄清楚它是如何看待从DeserializeJSON()方法反序列化的对象,我写了这个简单的场景,但它不起作用。谁知道这里有什么问题?
<cfset test = '[{"phone":"1001106672","label4":"12","hcats":"18","freshStart":"0","phoneCode":"","hproduct":"12","checked":false},{"phone":"1001106672","label4":"test","hcats":"54","freshStart":"0","phoneCode":"456","hproduct":"15","checked":false}]'>
<cfset test2 = DeserializeJSON(test)/>
<cfoutput>#test2#</cfoutput>
答案 0 :(得分:6)
您正在尝试cfoutput一个复杂的对象。尝试:<cfdump var="#test2#">
代替。