Going from JSON to java client side is more complicated. I'm not
aware of anything that will deserialize JSON to traditional java
objects in gwt - maybe there are parsers that can be gwt-compiled, but
you'll have to do that research. The normal way you do this is with
GWT overlay objects - it'll be much faster and more efficient than
actually parsing JSON in javascript, but it means you will have an
impedance mismatch between the java versions of your objects and the
overlay versions of your objects.
Good luck,
Jeff
Jeff
On Mon, Oct 25, 2010 at 8:38 PM, aswath satrasala
Are you generating JSON by hand? Don't. Use a serializer like
Jackson that does proper escaping.
> How do I reconstruct on the GWT.
I wouldn't try - in the past I've used gwt overlays for this kind of
thing. If you're dedicated to parsing JSON in javascript, here's
where I would start: http://lmgtfy.com/?q=gwt+json+parser
Jeff
http://timepedia.blogspot.com/2009/04/gwt-rpc-over-arbitrary-transports-uber.html
M
I didn't think to make the Ref serializer switch between rendering the
key string or object depending on load state. That's a brilliant
idea. I will use this.
It's a trivial amount of code and might as well go into objectify.jar.
Jeff
The transition to Jackson 2.0 is pretty easy - for the most part, just
the package changed. Tatu finally got rid of the zillions of
deprecated methods so you might find a few more changes... but overall
the interface is actually simpler and easier to understand now. All
those redundant config methods were painful.
Jeff