Skip to main content

JSON Response

Learn JSON Response (REST API with Spring MVC, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes JSON response is a JSON document written into the HTTP response body with header Content-Type: application/json . Return an object from a @RestController method and Spring serializes it with Jackson automatically. Collections and records work too: a List becomes a JSON array, a record becomes an object.

More lessons in REST API with Spring MVC