Published on InterSystems Developer Community (https://community.intersystems.com)

Home > handling multiple Json objects through HttpResponse data

Question
Raghu Yadati · May 20, 2021

handling multiple Json objects through HttpResponse data

pResponse.%JSONImport(tHttpResponse.Data)  failing when we have mulitple (array) json objects in response.

set patientSearchList = ##class(msg..patient.PatientSearchList).%New()

s rListObj={} 
d rListObj.%Set(ListViewName,[].%FromJSON(tHttpResponse.Data))

 do pResponse.%JSONImport(rListObj)

 

What's the better way to handle multiple json objects coming in response.

#JSON #InterSystems IRIS for Health
Product version: IRIS 2020.1

Source URL:https://community.intersystems.com/post/handling-multiple-json-objects-through-httpresponse-data