I have a GWT client project and REST is my web service. I have a class Student and I want to save it in data base which is in web service. I am converting student to json and sending to Server. Is it right method? My doubt is In client side am I have to use Json object instead of Student?(because it will not need any conversion for sending to server) And if i am using Json it will give good performance like java?
Share
JSON or JavaScript Object Notation, is a text-based open standard designed for human-readable data interchange.
So if you are using it to transfer data between your rest service and GWT front-end then its fine.
To save Student JSON notation you can convert it to POJO using many available library like jersey or GWTJsonizerand can store easily that to DB.
To summarise. JSON and Java object are two different things, use JSON to transfer information,
convert JSON to java object and use this java object for further processing in you web service