7.2. Basic Usage

Usage of Zend_Json involves using the two public static methods available: Zend_Json::encode() and Zend_Json::decode().

<?php
// Retrieve a value:
$phpNative = Zend_Json::decode($encodedValue);

// Encode it to return to the client:
$json = Zend_Json::encode($phpNative);
?>