Introduction

Basic Usage

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

  1. // Retrieve a value:
  2. $phpNative = Zend_Json::decode($encodedValue);
  3.  
  4. // Encode it to return to the client:
  5. $json = Zend_Json::encode($phpNative);

Introduction