Serialisation and deserialisation with Spring Framework
float like a butterfly sting like a bee
Ali said that long time ago. Suit his character — on the fight stage.
Serialisation is the conversion of the state of an object into a byte stream; deserialisation does the opposite.
I’ve been working on an API project for analytic purposes for the past few months and today I focused on serialisation & deserialisation — mainly to efficiently manage data stream activity for optimum performance.
Our API consumer request & receive response in the JSON format. When it comes to request body (from API consumer)— Spring deserialise (parse) the JSON into JAVA object (model). And for response body send to API consumer; Spring serialise from JAVA object to JSON.
The above bi-directional relationship powered by Spring Data JPA, and MySQL Connector.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId></dependency><dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope></dependency>