Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67303 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93795 invoked from network); 4 May 2013 15:20:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 May 2013 15:20:05 -0000 Authentication-Results: pb1.pair.com header.from=remi@fedoraproject.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=remi@fedoraproject.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fedoraproject.org from 212.27.42.5 cause and error) X-PHP-List-Original-Sender: remi@fedoraproject.org X-Host-Fingerprint: 212.27.42.5 smtp5-g21.free.fr Linux 2.6 Received: from [212.27.42.5] ([212.27.42.5:49167] helo=smtp5-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/BE-26044-22725815 for ; Sat, 04 May 2013 11:20:04 -0400 Received: from dixsept.famillecollet.com (unknown [82.241.130.121]) by smtp5-g21.free.fr (Postfix) with ESMTP id BDBEDD480DB for ; Sat, 4 May 2013 17:19:56 +0200 (CEST) Message-ID: <5185271B.9040007@fedoraproject.org> Date: Sat, 04 May 2013 17:19:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130403 Thunderbird/17.0.5 MIME-Version: 1.0 To: PHP Internals X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Proposal: new implentation of JSON extension. From: remi@fedoraproject.org (Remi Collet) Raise again this discussion as no feedback on pecl ML. Trying to solve https://bugs.php.net/bug.php?id=63520 I start to work on a dropin alternative for current json extension in php. Current work: https://github.com/remicollet/pecl-json-c It is obviously to late for PHP 5.5, and need probably more feedback, more tests, and more work before a RFC for PHP 5.6 (or later). * json_encode : same code than php 5.5, no difference * json_decode : wrapper over json-c 0.11 library. Difference: - error code returned by the parser are different (so only PHP_JSON_ERROR_SYNTAX and PHP_JSON_ERROR_DEPTH are used) - number only parse as integer (no automatic cast to double) - loose of performance (but still acceptable, I think) New feature: as json-c is an incremental parser, a new class is available to allow incremental parsing (for large json encoded data) Proposal: 1/ update existing pecl/json extension - on pecl for older PHP 5.3 - 5.5 - on php-src in master / 5.6 OR 2/ new pecl/json-c extension - PHP will keep the non free code Should I open a RFC ? Regards, Remi. P.S. I have tried to contact Omar, original author of this extension, without any success.