Re: Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread Jeffrey Chimene
On 8/3/2011 8:04 AM, Alexander Orlov wrote: Thx! GWT has a pretty idiosyncratic style! It's not up to GWT, it's up to the browser to evaluate the string. Take a look at the source code. Btw, were my assumptions how to construct a JSONObject right? Sort of. The JSON spec indicates that yo

Re: Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread Alexander Orlov
Thx! GWT has a pretty idiosyncratic style! Btw, were my assumptions how to construct a JSONObject right? -Alex -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/goo

Re: Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread kim young ill
try this : return eval('(' + json + ')'); On Wed, Aug 3, 2011 at 4:43 PM, Alexander Orlov wrote: > The JSONObject takes only JavaScriptObject as its constructor parameter. > JavaScriptObject can be returned only by a JSNI function which I wrote: > > public static native JavaScriptObject pars

Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread Alexander Orlov
The JSONObject takes only JavaScriptObject as its constructor parameter. JavaScriptObject can be returned only by a JSNI function which I wrote: public static native JavaScriptObject parseJson(String jsonStr) /*-{ return eval(jsonStr); }-*/; but when I do String json = "{\"user