10.2. Basic Usage
Prev | Chapter 10. Zend_Json | Next

## 10.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 10. Zend_Json | Home | 10.3. JSON Objects