PHP4 Json Encode & Decode

I just wanted to share this class I found for encoding and decoding information from and to JSON with PHP4. While encode_json($php) and decode_json($json) are simple enough to use, they are PHP5+ compatible, and could not be used easily with all installations of WordPress. I am working on a WordPress plugin that allows your to track your pages positions in Google for certain keywords. The plugin will be using the Google Search Ajax (Restful) API, which only returns data in a JSON format. I found the JSON class here on an article on JSON to XML with PHP4. I have also added the PHP4 Json encode & decode class text file for downloading. This class is from PEAR and can also be downloaded from the PEAR site. I will post this plugin when it is ready.

Download PHP4 Json encode & decode class

Leave a Reply


WP Login