K,所以我有这样的东西。我试图弄清楚如何不逃避双引号。我认为这是restler 做的......但我无法在restler 代码中找到关于我需要更改什么的文档或提示。如果我执行 str_replace('"', '*', jason_encode...),它会很好地显示星星...所以不是 json_encode 搞砸了...:
....
$thisDeal = new deals_search_element();
$thisDeal->deal_name="name2";
$thisDeal->venue_address="address2";
$thisDeal->latlong=$latlong;
$myDeals[] = $thisDeal;
return json_encode( array( "deals_search"=>$myDeals ));
我的输出是这样的:
"{\"deals_search\":[{\"deal_name\":\"test name 1\",\"deal_venue\":\"\",\"venue_address\":\"test address 1\",\"venue_city\":\"\",\"venue_state\":\"\",\"latlong\":\"1...
我知道数据与代码不匹配……但请相信我,关键是……双引号被转义了。我怎样才能阻止这个?