note 80606 added to function.json-decode

From: Date: Thu, 24 Jan 2008 23:25:44 +0000
Subject: note 80606 added to function.json-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-135385@lists.php.net to get a copy of this message
For JSON support in older versions of PHP you can use the Services_JSON class, available at http://pear.php.net/pepr/pepr-proposal-show.php?id=198 <?php if ( !function_exists('json_decode') ){ function json_decode($content, $assoc=false){ require_once 'Services/JSON.php'; if ( $assoc ){ $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); } else { $json = new Services_JSON; } return $json->decode($content); } } if ( !function_exists('json_encode') ){ function json_encode($content){ require_once 'Services/JSON.php'; $json = new Services_JSON; return $json->encode($content); } } ?> ---- Server IP: 66.207.199.35 Probable Submitter: 24.80.104.26 ---- Manual Page -- http://www.php.net/manual/en/function.json-decode.php Edit -- https://master.php.net/note/edit/80606 Del: integrated -- https://master.php.net/note/delete/80606/integrated Del: useless -- https://master.php.net/note/delete/80606/useless Del: bad code -- https://master.php.net/note/delete/80606/bad+code Del: spam -- https://master.php.net/note/delete/80606/spam Del: non-english -- https://master.php.net/note/delete/80606/non-english Del: in docs -- https://master.php.net/note/delete/80606/in+docs Del: other reasons-- https://master.php.net/note/delete/80606 Reject -- https://master.php.net/note/reject/80606 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135385) next »