For developing JSON webservices (RESTful webservices), Jersey could be used on glassfish. Please check this link (
https://jersey.dev.java.net/use/getting-started.html) for developing and deploying sample applications using Jersey on glassfish.The output format could be specified as JSON or XML.
To consumer the webservice,
i) from the command line, curl could be used
ii) from a web application, an XmlHttpRequest is to be created and sent.
The response in JSON format could be handled by the callback methods. Javascript libraries like jQuery or the jMaki toolkit (that is available as a Netbeans plugin as well) could be used to simplify the handling of XHR and the response.
HTH,
Nithya
[Message sent by forum member 'nitkal' (nitkal)]
http://forums.java.net/jive/thread.jspa?messageID=315293