Re: JSONParser.parseStrict() exception "Unexpected token <"

2012-08-16 Thread Dylan Spurgin
> > seven.reeds, can you give more detail on how you got the JSON from the > result HTML? Here is the code I'm currently trying: > HTML results = new HTML(event.getResults()); String text = results.getText(); JSONValue jsonValue = JSONParser.parseStrict(text); Which results in "Error parsing J

Re: JSONParser.parseStrict() exception "Unexpected token <"

2012-08-01 Thread seven.reeds
Hi Colin, Thanks! Your ideas moved me towards a solution. Turns out that FormPanel->onSubmitComplete returns whatever is returned as "html". My result was surrounded by PRE tags. I sucked the getResult output into a HTML instance and then used the getText method to get what I wanted. This i

Re: JSONParser.parseStrict() exception "Unexpected token <"

2012-07-31 Thread Colin Alworth
Your catch (Exception e) should also be printing out the results, but your quoted error message didn't contain that exact json - any chance that the json you started with isn't actually making it to the client? One simple way to test would be to escape that string and put it in your Java code (

JSONParser.parseStrict() exception "Unexpected token <"

2012-07-31 Thread seven.reeds
Hi, GWT 2.4.0 Eclipse Juno Ubuntu I am using a GWT Form. In the form.addSubmitCompleteHandler() I do the following: try { Info = JSONParser.parseStrict(event.getResults()).isObject(); } catch (NullPointerException e) { RootPanel.get("list").clear(); RootPanel.get("list").add(new HTML("" + eve