AJAX
[ class tree: AJAX ] [ index: AJAX ] [ all elements ]

Source for file JSON.php

Documentation is available at JSON.php

  1. <?php
  2. require_once 'HTML/AJAX/JSON.php';
  3. /**
  4.  * JSON Serializer
  5.  *
  6.  * @category   HTML
  7.  * @package    AJAX
  8.  * @author     Joshua Eichorn <josh@bluga.net>
  9.  * @copyright  2005 Joshua Eichorn
  10.  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  11.  * @version    Release: @package_version@
  12.  * @link       http://pear.php.net/package/PackageName
  13.  * @todo       Support C JSON extension
  14.  */
  15.  
  16.     /**
  17.      * JSON instance
  18.      * @var HTML_AJAX_JSON 
  19.      * @access private
  20.      */
  21.     var $_json;
  22.  
  23.     function HTML_AJAX_Serializer_JSON({
  24.         $this->_json =new HTML_AJAX_JSON();
  25.     }
  26.  
  27.     function serialize($input{
  28.         return $this->_json->encode($input);
  29.     }
  30.  
  31.     function unserialize($input{
  32.         return $this->_json->decode($input);
  33.     }
  34. }
  35. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  36. ?>

Documentation generated on Mon, 11 Mar 2019 14:16:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.