Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19151 invoked from network); 11 Jan 2015 21:19:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2015 21:19:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.207 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.207 imap2-2.ox.privateemail.com Received: from [192.64.116.207] ([192.64.116.207:57874] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/E1-05184-6F8E2B45 for ; Sun, 11 Jan 2015 16:19:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 7EAB78C0069; Sun, 11 Jan 2015 16:19:47 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ImI3ECT0__Rt; Sun, 11 Jan 2015 16:19:47 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id BC78E8C0009; Sun, 11 Jan 2015 16:19:46 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: Date: Sun, 11 Jan 2015 21:19:44 +0000 Cc: Paul Dragoonis , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Jakub Zelenka X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] jsond From: ajf@ajf.me (Andrea Faulds) Hey Jakub, > On 11 Jan 2015, at 20:10, Jakub Zelenka wrote: >=20 > Let's first show an example and make clear what the whole thing: > http://3v4l.org/2D72Q >=20 > As you can see, the first type (07, 0xff, .1 and -.1) examples are = really > inconsistent and give a different results if there are in the array = (error) > or as a scalar. This seems like an obvious bug. >=20 > The type 2 is consistent. The only problem is that such number format = does > not conform to RFC 7159 where the number is specified in > https://tools.ietf.org/html/rfc7159#section-6 : >=20 > number =3D [ minus ] int [ frac ] [ exp ] > frac =3D decimal-point 1*DIGIT >=20 > As you can see there is required a digit after decimal point... In = this > case we have a non conforming parser which is not right IMHO. It=E2=80=99s not even valid according to the train-track diagrams on = json.org: http://json.org/number.gif Thanks for your work on this. -- Andrea Faulds http://ajf.me/