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

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