简体   繁体   中英

Using Json And Gson In java web Applications

Hi could anyone please explain me,When we need to use JSon or Gson. What would be the scenario?Could it possible to use Gson or Json in request scope attribute or only during ajax response in the application.

Along with ajax json can be used as a request.setAttribute and also you can retrieve the json between servlet and JSP. Check this link out for your understanding..

http://spritiuallyjava.blogspot.in/2012/07/json-with-jsp-and-servlets.html

You can use Gson (library) to generate a JSON (format) object that you can use with anything that needs a JSON representation of an object. In Java web applications, this is often for AJAX responses.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM