Question
· Sep 29

Response of JSON type

Hi Guys,

I'm using the below simple Get Webservice to return a JSON file, its working but the response is actually of Text type not JSON Type 

ClassMethod cmGetHomes(cnt1, cnt2) As %Status
{    response="{""Land"""_":"_""""_cnt1_""",""Home"""_":"_""""_cnt2_"""}"
 // set dataObj=##class(%DynamicObject).%FromJSON(response.data)
 //set response.data = dataObj
 //W response.%ToJSON()
 //set response.data = {}.%FromJSON(response.data)
 //set response.data = {}.%FromJSON(response.data)
 response
 Quit $$$OK
}

This is the response that I'm getting in Postman

But it says type is text not JSON 

 

Thanks

Product version: Ensemble 2018.1
Discussion (5)1
Log in or sign up to continue