JSON Response in Servlet
It is easy for humans to read and write. It is easy for machines to parse and generate. We have java based json framework(GSON , Jackson Mapper etc), which are responsible for converting JSON into java object and java object into JSON format.
JSON sample format :-
Ajax Example with JSON Response by Servlet :-