JSON Encoding

php_encode now returns an encoded JSON object