users@glassfish.java.net

Re: Gizzly Websocket how to use google json sending and ...

From: <forums_at_java.net>
Date: Wed, 16 Jan 2013 08:32:33 -0600 (CST)

I found a solution. I dont know if it is the best solution but from the
client I used the following: var member ={ "firstName":"Ray",
"lastName":"Villalobos", "joined":2012 }; var dataMember =
JSON.stringify(member); ws.onopen = function(evt) { log("socket opened");
ws.send (dataMember);}; I then just use google json to parse the string: Data
data = new Gson().fromJson(text, Data.class); If there is a better way please
let me know? Thanks Charlie

--
[Message sent by forum member 'charliesimms']
View Post: http://forums.java.net/node/893873