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
- REST Architecture
- RESTful API Design
- REST Controller
- @RestController
- JSON Request
- Jackson
- ObjectMapper
- JSON Serialization
- JSON Deserialization
- HttpMessageConverter
- MappingJackson2HttpMessageConverter
- ResponseEntity
- HTTP Status Codes
- API Versioning
- REST API Best Practices
- Mini Project: REST Details: PUT vs PATCH, Pagination, ETag and Allowed Methods