QSTACK-80: Changed response serialization in the RestServlet
QSTACK-80: Comments for clarity