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

Home > Http Response Parsing JSON string or stream

Question
Jimmy Christian · Jul 16, 2019

Http Response Parsing JSON string or stream

Hello community,

I am trying to parse the below HttpResponse in Cache. Cannot get the Iterator to work. Is there a single loop which can parse both or single messages and grab the error?

{
error:[
{ txt1:'error msg1'},

{ txt2:'error msg2'},
]
}

 

{
error: {
txt1:[
'error msg1',

'error msg2'
]
}

 

Thanks,

Jimmy Christian

#JSON #REST API #Caché

Source URL:https://community.intersystems.com/post/http-response-parsing-json-string-or-stream