Map JSON response to domain

1
We are using the REST module and we get the following response: {"response": { "result": true, "error": false, "request": { "method": "GET", "resource": "candidate", "operation": "search", "path": "/candidate/search/", "params": {"firstname": "Jos"} }, "itemsCount": 1, "limit": 1, "offset": 0, "item": { "id": 90153, "sex": "v", "initials": "", "firstname": "Name", "insertion": "", "lastname": "aabb-Olthof", "fullname": "Name aabb-Olthof", "address": "Street", "zipcode": "1000AA", "city": "Amsterdam", "phone": "0611223344", "mobile": "0611223344", "email": "xxx@hotmail.com", "age": 63, "birthdate": "1952-05-25", "birthplace": "", "nationality": null, "travelMaximum": 50, "workexperience": [], "education": [], "driverlicense": { "A": false, "B": false, "C": false, "C1": false, "D": false, "D1": false, "E": false, "G": false, "L": false }, "linkedinAccount": null, "twitterAccount": null, "facebookAccount": null, "skypeAccount": null, "latitude": 52.275196, "longitude": 6.4166193, "establishmentId": 26, "establishment": "Synerg-e", "intermediary": null, "entities": [ { "entityId": 1, "entityName": "Synerg-e" }], "companyId": null, "company": null, "poolTypeSubscriptions": [], "entityPoolSubscriptions": [], "companyPoolSubscriptions": [] } }} The GET java action does not map this to our domain NP object. response request and item How should we map this response? Thanks!
asked
2 answers
0

Edit: Thanks Achiel for updating.

Theo, have you tried creating the domain model yet? If so, can you share it? If not, make sure you read this how-to article.

answered
0

What Eric says sounds right. Try building your domain model this way:

Start with an entity Query with an association to ResponseInfo (called response) and associate that to Person (called item).

answered