I actually figured out the problem. There were '\n' characters in the string I was trying to parse. Once removed that solved the problem.
Sent via iPhone On Aug 19, 2009, at 11:02 AM, Jeff Chimene <jchim...@gmail.com> wrote: > > On 08/19/2009 09:00 AM, Jeff Chimene wrote: >> On 08/19/2009 12:56 AM, Thomas Broyer wrote: >>> >>> >>> >>> On 19 août, 01:12, Jeff Chimene <jchim...@gmail.com> wrote: >>>> On 08/18/2009 04:01 PM, Thomas Broyer wrote: >>>> >>>>> Well, JSONParser actually calls eval() *with* the wrapping >>>>> parentheses. >>>> >>>> Are they added in the parent? >>>> >>>> Checking the trunk source, I don't see that concatenation: >>>> >>>> public static JSONValue parse(String jsonString) { >>>> if (jsonString == null) { >>>> throw new NullPointerException(); >>>> } >>>> if (jsonString.length() == 0) { >>>> throw new IllegalArgumentException("empty argument"); >>>> } >>>> try { >>>> return evaluate(jsonString); >>>> } catch (JavaScriptException ex) { >>>> throw new JSONException(ex); >>>> } >>>> } >>> >>> From the very same file: >>> private static native JSONValue evaluate(String jsonString) /*-{ >>> var v = eval('(' + jsonString + ')'); >>> var func = @com.google.gwt.json.client.JSONParser::typeMap[typeof >>> v]; >>> return func ? func(v) : >>> @com.google.gwt.json.client.JSONParser::throwUnknownTypeException >>> (Ljava/lang/String;)(typeof v); >>> }-*/; >>> >> >> Well, yes. But the OP said he's using JSONParser.parse() How does >> JSONValue.evaluate() get called in that scenario? > > Oh, never mind. I figured it out. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---