So far, our APIs have been working using JSON, from return JSON objects as results, to accepting JSON objects in the body of the request. But we need to understand how this works and how we can create and use more complicated JSON objects. In this section, we will review the different mechanisms that Spring provides to handle our JSON requests and responses.
Working with JSON
Understanding serialization
In our examples, we have created the Customer class and we have seen that returning an object of that class in our controller, either directly or through a response entity, it will get converted into JSON. This mechanism is known as serialization, converting an object into a representation, in our case, a JSON object.
Spring...