Yes you can generate JSON data from a bean class using the JSON API
net.sf.json.JSONObject
The library above will provide you with the method and the method below, we can create a jsonobject from the bean class
JSONObject.fromObject(yourbean)
source
share