I've got a weird issue with the json-output of my Custom REST-API.
The json-output of a standard REST-request is like:
{"1":{"value"}}
The json-output of my custom REST-request is like:
"{\"1\":{\"value\"}}"
As you can see the json-output is wrapped in double quotes and the other double are escaped.
The _retrieve()-function of my custom REST-API is:
public function _retrieve()
{
$productCollection = Mage::getModel('sales/order')
->getCollection()
->addAttributeToSelect('*')
->load();
$helper = Mage::helper('core');
return $helper->jsonEncode($productCollection);
}
What i'am missing here?