Re: JSONNumber - optional decimal

2010-06-15 Thread Garrett Smith
On 6/10/10, Sigbjorn Finne sigbjorn.fi...@gmail.com wrote: Hi Garrett, On 6/9/2010 05:46, Garrett Smith wrote: ... IF anyone has a correct JSON parser, I would appreciate it. Also, are there any good test suites for JSON? http://testsuites.opera.com/JSON/ is one. Hallvord Steen has a

Re: JSONNumber - optional decimal

2010-06-09 Thread Oliver Hunt
On Jun 8, 2010, at 8:46 PM, Garrett Smith wrote: Today I looked for a good json regexp tester and finding nothing, decided to write one. The strategy that occurred to me was to first define a regex for the literal components (ES5 lumps literal value into the JSONValue alongside JSONObject

Re: JSONNumber - optional decimal

2010-06-09 Thread Garrett Smith
On 6/8/10, Oliver Hunt oli...@apple.com wrote: On Jun 8, 2010, at 8:46 PM, Garrett Smith wrote: [...] IF anyone has a correct JSON parser, I would appreciate it. Also, are there any good test suites for JSON? I spent quite a bit of time ensuring JSC's JSON parser exactly matched the spec

Re: Re: JSONNumber - optional decimal

2010-06-09 Thread Douglas Crockford
On 11:59 AM, Oliver Hunt wrote: That said I think allowing '1.' (etc) makes sense as it's fairly standard across multiple programming languages, and I am unaware of any specific reason for disallowing it. In the long term I don't see changing the grammar to allow a trailing period as being

Re: Re: JSONNumber - optional decimal

2010-06-09 Thread Mark S. Miller
On Wed, Jun 9, 2010 at 7:43 AM, Douglas Crockford doug...@crockford.comwrote: On 11:59 AM, Oliver Hunt wrote: That said I think allowing '1.' (etc) makes sense as it's fairly standard across multiple programming languages, and I am unaware of any specific reason for disallowing it. In the

JSONNumber - optional decimal

2010-06-08 Thread Garrett Smith
Today I looked for a good json regexp tester and finding nothing, decided to write one. The strategy that occurred to me was to first define a regex for the literal components (ES5 lumps literal value into the JSONValue alongside JSONObject and JSONArray). That way, I could reuse the literal