more JSON spec questions

Oliver Hunt oliver at apple.com
Wed Aug 26 17:02:54 PDT 2009


On Aug 26, 2009, at 4:50 PM, Hallvord R. M. Steen wrote:

> On Thu, 27 Aug 2009 01:22:46 +0200, Oliver Hunt <oliver at apple.com>  
> wrote:
>
>>>> Octal values are completely specified -- the lexer defined in ES5
>>>> and json.org  disallows a leading 0 on any value not between -1 and
>>>> 1.
>
> Good to hear but - sorry! - I can't quite see where the spec  
> supports this conclusion. I tried looking at the lexical and  
> syntactical grammars and the JSON.parse() algorithm.

 From sections 7.8.3 and 15.12.1.1
JSONNumber ::
  -<opt> DecimalIntegerLiteral JSONFraction <opt> ExponentPart <opt>

DecimalIntegerLiteral ::
0
NonZeroDigit DecimalDigits <opt>

eg. the only valid character left of the decimal point the begins with  
0 is 0

--Oliver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090826/334ddf96/attachment.html>


More information about the es-discuss mailing list