Encode data as JSON, disable layouts, and set response header.
If $keepLayouts is true, does not disable layouts. If $encodeJson is false, does not JSON-encode $data
- Parameters
-
mixed | $data | |
bool | $keepLayouts | NOTE: if boolean, establish $keepLayouts to true|false if array, admit params for Zend_Json::encode as enableJsonExprFinder=>true|false this array can contains a 'keepLayout'=>true|false and/or 'encodeData'=>true|false that will not be passed to Zend_Json::encode method but will be used here |
bool | $encodeData | |
- Returns
- string|void