Hi,
I have a task whereby I need to integrate with a third party API. I am planning to do something along these lines:
https://spring.io/guides/gs/consuming-rest/, meaning using Spring’s RestTemplate to retrieve the response of an external API from within my Spring Boot application. Until this all good, but the second step is to "re-construct" aka convert the existing response to a new format.
For example, the original response from the 3rd party API is something like:
and the expected customised output should look like:
Expected changes are both in format/data structure (e.g. field_3_1 is now a field inside an array) and the field naming convention (e.g: "id" becomes "application_id"). Is there any Spring library/class I can use for easily make the conversion? I will create a new model class with the customised response, but I am not sure about the approach for re-structuring the data. Can you help? Is there any example I can look it up?
Thank you,
G.