Is there a particular reason that you _need_ the JSON string? If your using GWT RPC then you can simply send a Java Object to the server and the underlying GWT will handle the serialization for you.
If you the JSON string is coming from somewhere else and you really have no choice, then it may be worthwhile to put together a JSO Overlay, use the Overlay to instantiate a POJO on the client side code, and send the POJO to the server via GWT RPC. Since your new some of that probably makes no sense, and If you can give a little more detail as to why you need to have JSON originating from the client I'm sure this can be explained a bit better to fit your case. GWT-RPC: http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html GWT-JSON: http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html#client 2010/6/16 Jose Luis Estrella Campaña <[email protected]>: > Hello Folks ! > > I'm glad to say that I'm a brand new user of GWT, a very happy one by > the way. However, as any newcomer I have questions, One in particular. > Here it goes: > > What's the easiest, most straight forward way to deserialize a JSON > String on the Server side and instance a Java Object from it ? > > The JSON String will be sent from the client side, an implementation > of the RemoteService for example, and I intend to deserialize it on > the Server side, say inside the RemoteServiceServlet Implementation, > so I can instance a Java Object with the information contained in the > JSON string afterwards. Is there a way this last step automatically > with some GWT API ? > > I would like to see some examples if it's possible. > > Best Regards, > > Sincerely, > > Jose. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
