I am using smart GWT for an application. I want to pass a bean to the client as a response. Is there any way to convert a java bean into json data. Or if someone has some different approach to do this then please suggest.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As for the json: there are libraries like gson that allow you to convert beans to json and back.
If you don’t have a Java bean but want to create json use libraries like json-simple.
There might be better ways in GWT but I’m no expert and thus I’ll leave that to someone else.