Re: PECL JSON package
| From: | Phil Ewington - iModel | Date: | Thu, 11 Dec 2008 18:36:29 +0000 |
| Subject: | Re: PECL JSON package | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284490@lists.php.net to get a copy of this message | ||
Eric Butera wrote:
On Thu, Dec 11, 2008 at 5:43 AM, Phil Ewington - iModel <phil.ewington@i-model.co.uk> wrote:If you're using the pecl version, it is json_encode(). If you're using the pear version you say require_once 'Services/JSON.php'; $json = new Services_JSON(); $output = $json->encode($value); If you're using php5, you should have json in the build unless it was disabled for some reason. If you're going to be using it a lot, you're really going to want the speed of the c version. Yeah thanks. I am using the PECL version and have it compiled as an extension now working fine, just got confused with installing PEAR scripts. I have PHP 5.1.6, JSON only available in build from 5.2.0 I believe. - Phil.Phil Ewington - iModel wrote:OK, seems I am confusing PECL and PEAR. Have now configured extension using phpize and enabled in php.ini. - Phil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpI have just installed the PECL JSON package, or at least think I have!! But how do I use it?? I was expecting /usr/share/pear/Services/JSON.php to be found on my system for include but not so. My system tells me I have 1.2.1 successfully installed but I cannot find any docs that tell me how to make use of it. I am running PHP 5.1.6 at present. TIA Phil.Hi All,