14.2. Basic Usage
Prev | Chapter 14. Zend_Json | Next

## 14.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);
    ?>

Prev | Up | Next
Chapter 14. Zend_Json | Home | 14.3. JSON Objects