Encoding an array to JSON is dead easy on PHP 5.2+: you just use PHP's function json_encode(). The thing is, WordPress has pretty loose requirements and is designed to run on older PHP builds. For those, you need a third party library that will encode to (and decode from, if you need) JSON. The cool […][...] → Read more