I get JSONString as the answer as below
{"size":3,"page-size":3,"subscribers-aircraft":
[
{"company-name":"ATCOMPANYTEST","tailno":"N345","status":"ACTIVE","network-status":"ACTIVE","id":18501,"contact":"SS Theairtime","model":"A-380-800","note":null,"created-at":"Jun 29, 2015 7:42:54 AM","packages":2,"username":"ATAIRCRAFTTEST","external-account":null,"consumer-type":"AIRCRAFT","isp-id":18493,"parent-id":18497,"subscriber-feature-id":13,"status-code":null,"status-msg":null},
{"company-name":"The AIRTIME 3","tailno":"VT456","status":"ACTIVE","network-status":"ACTIVE","id":18489,"contact":"Ramesh Anantarapu","model":"C-21","note":null,"created-at":"Jun 25, 2015 8:27:16 AM","packages":0,"username":"ramesh23","external-account":null,"consumer-type":"AIRCRAFT","isp-id":18469,"parent-id":18473,"subscriber-feature-id":9,"status-code":null,"status-msg":null},
{"company-name":"The AIRTIME 3","tailno":"VT23","status":"ACTIVE","network-status":"OFFLINE","id":18485,"contact":"Ramesh Anantarapu","model":"747-100","note":null,"created-at":"Jun 23, 2015 2:49:15 PM","packages":1,"username":"ramesh","external-account":null,"consumer-type":"AIRCRAFT","isp-id":18469,"parent-id":18473,"subscriber-feature-id":5,"status-code":null,"status-msg":null}],
"status-code":"AIRTIME-P4000","status-msg":"Successfully"}
This is a flat answer.
Now I'm trying to map it to the upper level POJO, called AircraftInfoone that contains the other two POJOsas its objects.
While, for example, the company name, tailNo and status belong directly to AircraftInfo during the username, the identifier belongs to UserInfo POJO, which is an entity in AircraftInfo.
Since the JSON response is flat, it is almost impossible to display such a response in a nested structure.
Can anyone suggest the most elegant way to achieve?