Re: [RFC] jsond

From: Date: Sun, 11 Jan 2015 21:19:44 +0000
Subject: Re: [RFC] jsond
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-80380@lists.php.net to get a copy of this message
Hey Jakub, > On 11 Jan 2015, at 20:10, Jakub Zelenka <bukka@php.net> wrote: > > Let's first show an example and make clear what the whole thing: > http://3v4l.org/2D72Q > > 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. > > 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 : > > number = [ minus ] int [ frac ] [ exp ] > frac = decimal-point 1*DIGIT > > 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’s 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/

« previous php.internals (#80380) next »