How to test JSON (de-)serialization in your Spring Boot application with @JsonTest

JSON is a popular data format that is widely used in the communication between systems. Most of the time, I see it being sent with an HTTP request or as the content of a message in a message bus. To ensure the stability of the communication between such systems, it is important that the structure of the JSON does not change without the agreement of both participants. With @JsonTest, Spring Boot contains a handy tool to test the serialization of Java objects into JSON and vice versa.

[Read More]