Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73180 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72809 invoked from network); 15 Mar 2014 19:17:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2014 19:17:53 -0000 Authentication-Results: pb1.pair.com header.from=php_m@rtin.so; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_m@rtin.so; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain rtin.so from 209.85.160.53 cause and error) X-PHP-List-Original-Sender: php_m@rtin.so X-Host-Fingerprint: 209.85.160.53 mail-pb0-f53.google.com Received: from [209.85.160.53] ([209.85.160.53:53810] helo=mail-pb0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/02-53536-067A4235 for ; Sat, 15 Mar 2014 14:17:53 -0500 Received: by mail-pb0-f53.google.com with SMTP id rp16so4018107pbb.12 for ; Sat, 15 Mar 2014 12:17:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=4ScWPHbhbmkyDHKT8wd5TzcQQSgOfnXoRozgmN1y1/Y=; b=cctnuXqs9JF4cFMgeAQcu95uz0eXa7jbLDf2sr3B0+95su7VMiHG09sMP9UDTE1vEL OhFn48HmiU2ayYnnPclVqc6KNaOYeYX03mnTyE6zD2IZu6Au0mgWxCcth9xpVDan7lb5 IiBJPSoYLOk8ZbI3Pbxg/bAKMyIQAoM9rI5ut4e3z2b3eKKlDlyWPMcWoX6Zt+rBYmjv ng8oKd/Rr88YFsgBG7CP/5AgLeke+6sA3D+l6Yt0truuVQEDlHC2+zJ6Yky2AOYBuECF W76a0oIcKT8+TWN0lDbF4iDIRE8jGGl6pI5FxzxA2YkvD+FTtdyccLIfEMMZ3Z9vkCq9 DecA== X-Gm-Message-State: ALoCoQn1OsZSIrWLdGQHYiHesfskNqn9njZNOfg6i9D6qQlYZi+swu6syzhiABiiHBqQWgJSmYgG X-Received: by 10.68.125.164 with SMTP id mr4mr16217615pbb.27.1394911069772; Sat, 15 Mar 2014 12:17:49 -0700 (PDT) Received: from [10.0.1.223] ([209.249.180.85]) by mx.google.com with ESMTPSA id db3sm28337043pbb.10.2014.03.15.12.17.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Mar 2014 12:17:48 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) In-Reply-To: Date: Sat, 15 Mar 2014 12:17:45 -0700 Cc: Marco Schuster , PHP internals list Content-Transfer-Encoding: quoted-printable Message-ID: <0689A0BE-50DA-4AE8-94E3-75056EBD73F2@rtin.so> References: To: Jakub Zelenka X-Mailer: Apple Mail (2.1827) Subject: Re: [PHP-DEV] New JSON parser From: php_m@rtin.so (Martin Amps) This is awesome. Thanks! On Mar 15, 2014, at 12:07 PM, Jakub Zelenka wrote: > On Thu, Mar 13, 2014 at 10:37 PM, Marco Schuster = wrote: >=20 >>=20 >> At least for the decoding part, it might be worth to look at the >> "Improving JSON" proposal (http://bolinfest.com/essays/json.html). >> tl;dr: support trailing or automatic line-end commas, //-style >> comments and keys not wrapped in "s, basically extend JSON syntax to >> ES5. >>=20 >> I think it would be really cool if the new parser could (maybe with a >> option "JSON_NO_STRICT_PARSING") implement these enhancements to ease >> hand-writing of JSON files. >>=20 >>=20 > The current implementation doesn't introduce any changes from the user > point of view (except improved performance :) ). I want to keep it = simple > and not over complicate the proposal. I am sure that we can discuss = further > improvements if the new parser is accepted to the core. However it = will > require a new RFC and thread... :) >=20 > Also, will end-users be able to get the JSON parser error message? >> Currently, all you get is a NULL returned when you have a parse error >> somewhere in your JSON - and it's a nightmare to debug with this. >>=20 >>=20 > You can get some info using json_last_error(_msg). However it's not = very > useful because you can't identify the position of the error. I plan to > improve that but again it's not gonna be in the current proposal. >=20 > To sum it up. There are NO changes for PHP users! This is just = internal > change... ;) >=20 > Thanks >=20 > Jakub