I am stuck using a pre 5.2 release of PHP (v 5.1.6), and therefore don’t have access to the handy functions like json_decode()
To complicate matters, I also don’t have server privileges to install any extensions.
It would be really nice to simply include a class definition that i can use to create objects (or even a complex array) from a string of json data.
Does anyone know of a lightweight and reliable class definition that will work for me?
(I don’t really feel like re-inventing the wheel here.)
Thanks in Advance!
You can download the pear JSON library directly and include the script in your app. Check out this link: http://pear.php.net/package/Services_JSON/download