Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73179 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71158 invoked from network); 15 Mar 2014 19:07:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2014 19:07:37 -0000 Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.50 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.216.50 mail-qa0-f50.google.com Received: from [209.85.216.50] ([209.85.216.50:33132] helo=mail-qa0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/A1-53536-8F4A4235 for ; Sat, 15 Mar 2014 14:07:36 -0500 Received: by mail-qa0-f50.google.com with SMTP id o15so3803677qap.23 for ; Sat, 15 Mar 2014 12:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=+6thwGUOnHWe1591ZBCvXsbaqCxdeWFJA0O/KIeQ45I=; b=OjlRJzkH+RKAHpoxbKiN3mSsDaruixBb1EhntajSTqYkri3U65v1YRBek+ZH5RSbgM ctrMJF93PZphegmYzXRulay9ztmXHZ376XxWYrlu1OBoVqvXcK12VVv+xcCxOQcWUUY2 18uYNZ//lGLaYTZFDmBfclubDJeuA7g+aeL3rgbKITrbTeUX/t+bV2IO+JRsNTpeMtsR SFnsrlbbAgbaUk3MpMMJbYZ8L+gfoW0YsKG48lVlzEFSzvdSb3vPC5pfXjHD7VOZ6sZU q84G58YMe/G7aGhAEoqmJYAF5442HpJSTE145UcDArT0HjRA62ukBgyE3Z+m02Daf0ta ieVw== MIME-Version: 1.0 X-Received: by 10.140.38.168 with SMTP id t37mr17091898qgt.33.1394910453907; Sat, 15 Mar 2014 12:07:33 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.224.126.72 with HTTP; Sat, 15 Mar 2014 12:07:33 -0700 (PDT) In-Reply-To: References: Date: Sat, 15 Mar 2014 19:07:33 +0000 X-Google-Sender-Auth: UMTY3qaA8oHDFkB-UxN2poLkxIs Message-ID: To: Marco Schuster Cc: PHP internals list Content-Type: multipart/alternative; boundary=001a11c136ce19564f04f4a9e6f5 Subject: Re: [PHP-DEV] New JSON parser From: bukka@php.net (Jakub Zelenka) --001a11c136ce19564f04f4a9e6f5 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Mar 13, 2014 at 10:37 PM, Marco Schuster wrote: > > 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. > > 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. > > 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... :) 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. > > 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. To sum it up. There are NO changes for PHP users! This is just internal change... ;) Thanks Jakub --001a11c136ce19564f04f4a9e6f5--