Reputation: 33
I am writing a REST API which consumes other APIs (mainly using Feign clients), performs business logic to compile/massage data and serves it as a response from this one. One of the APIs being consumed is using the JSON:API standard structure for its data structure. The other APIs being used have OpenAPI-defined responses and components that are specific to the data being returned, and Spring Boot with Jackson configured will deserialize these responses into Java POJO models with the same structure as the responses and components.
My question is, is it possible to have the same kind of native JSON deserialization into POJO classes that represent the data contained in the JSON:API standard response but is not strictly structured that way? (ie. Some kind of existing library that would work with Spring Boot and deserialize the JSON:API-formatted response into a POJO that contains the data properties and relationships without being nested in data
and includes
fields.)
Upvotes: 2
Views: 63
Reputation: 868
you can serialize and map you object with DAO and Jackson library
Upvotes: 0