Magento 返回json数据

magento拥有自己返回json数据的方法

 $this->getResponse()->setHeader('Content-type', 'application/json');

$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));

 

 

 

 

 

 

你可能感兴趣的:(Magento)