Re: JSONParser bug ?

2010-02-05 Thread dolcra...@gmail.com
// It was a primitive wrapper, unwrap it and try again. It looks like javascript's date is a primitive wrapper to a number (maybe seconds from epoch?) Which makes sense as that's the only bit of data it should store. Maybe look at implementing Date with a JavaScriptObject that wraps the object.

Re: JSONParser bug ?

2010-02-05 Thread Thomas Broyer
On Feb 4, 9:04 pm, Costa wrote: > I have attempted the following code snippet: > > String data = "new $wnd.Date(2010,0,28,17,8,48,0)"; > JSONValue value = JSONParser.parse(data); > > To my dismay it returns a JSONNumber !! > > Now I looked in the source code (JSONParser.java: parse, evaluate & >

JSONParser bug ?

2010-02-04 Thread Costa
I have attempted the following code snippet: String data = "new $wnd.Date(2010,0,28,17,8,48,0)"; JSONValue value = JSONParser.parse(data); To my dismay it returns a JSONNumber !! Now I looked in the source code (JSONParser.java: parse, evaluate & createObject) and I created the following test pr