lundi 25 décembre 2017

How to check the StatusCode in json object to get a string of httpResponse rest API

I can't check StatusCode when REST API and parse JObject

code

string jsonResponse = HttpRequest(HostAPI, "POST", paramModel);
JObject jsonObject = JObject.Parse(jsonResponse);
if (jsonObject["data"] != null && jsonObject["StatusCode"]==200)  ????

jsonResponse

{"data":[{"OBJID":1012540462,"SUPID":1041252952,"STATUSPTC":1.0,"DATEACTIVESUP":0.0}],"StatusCode":200}

Please help me if you know ???




Aucun commentaire:

Enregistrer un commentaire