Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Simplify AJAX context switching based on requested format
boolean $suppressExit = 'false'Suppress exit when sendJson() called
 Details
 Detailsdirect(
          mixed $data, boolean $sendNow
              =
              true, boolean $keepLayouts
              =
              false
          )
        
        :
        string|voidStrategy pattern: call helper as helper broker method
Allows encoding JSON. If $sendNow is true, immediately sends JSON response.
 Details
 DetailsencodeJson(
          mixed $data, boolean|boolean|array $keepLayouts
              =
              false
          )
        
        :
        stringCreate JSON response
Encodes and returns data to JSON. Content-Type header set to 'application/json', and disables layouts and viewRenderer (if being used).
 Details
 DetailssendJson(
          mixed $data, boolean|array $keepLayouts
              =
              false
          )
        
        :
        string|voidEncode JSON response and immediately send
 Details
 Details