I’ve run into an issue with the Json response body of an internal API. A successful POST request will return an array of JSON objects but without a parent or root name. This is causing some trouble with the JSON package as it needs a root name in order to fetch the node value.
Is there another package that can parse this data without needing an object root name?
Below is an example of the response:
o
{
"mrn": "211757",
"firstName": "Tester",
"lastName": "Jimmy",
"dateOfBirth": "2022-02-02",
"gender": "None",
"county": "",
"homePhone": "111-111-1111",
"workPhone": "222-222-2222",
"cellPhone": "333-333-3333",
"email": "b@h.com",
"primaryPhone": "None",
"codeStat": "Ycanth RPh",
"category": "Ycanth",
"insCoord": "",
"primaryRN": ""
},
{
"mrn": "211758",
"firstName": "Tester",
"lastName": "Jimmy",
"dateOfBirth": "2022-02-02",
"gender": "None",
"county": "",
"homePhone": "111-111-1111",
"workPhone": "",
"cellPhone": "",
"email": "b@h.com",
"primaryPhone": "None",
"codeStat": "Ycanth RPh",
"category": "Ycanth",
"insCoord": "",
"primaryRN": ""
},
{
"mrn": "211759",
"firstName": "Tester",
"lastName": "Jimmy",
"dateOfBirth": "2022-02-02",
"gender": "None",
"county": "",
"homePhone": "111-111-1111",
"workPhone": "",
"cellPhone": "",
"email": "",
"primaryPhone": "None",
"codeStat": "Ycanth RPh",
"category": "Ycanth",
"insCoord": "",
"primaryRN": ""
}
]