In the response from a REST API call I got a JSON payload.
Source JSON
It contains a parameters
map containing key-value pairs like this:
{"account": {"sample_id": 1424876658095,"parameters": [ {"name": "email","value": "hello@xyz.com" }, {"name": "first_name","value": "FIRSTNAME" }, {"name": "last_name","value": "LASTNAME" } ] },"assests": [ {"tran_id": "1234567", }]}
Target JSON
I would like to process this response in Java and transform or serialize it to a JSON response like this:
{"account": {"sample_id": 1424876658095,"email_id": "hello@xyz.com","first_name": "FIRSTNAME","last_name": "LASTNAME", },"assets": [ {"tran_id": "1234567", }]}
Question
I am using the JAX-RS specification for the REST API, but I am not able to find any library to process the response.
Any ideas?