Reading json Data in AX

Hi I want to read JSON response in AX. How may i achieve this?I am unsing newtonsoft Json object to read the response.

Newtonsoft.Json.Linq.JObject obj = new Newtonsoft.Json.Linq.JObject();

the value that i am getting back in AX is

NAME:

VALUE:

TYPE:

NAME:

obj

VALUE:

{

“Status”: true,

“Message”: {

“ConfirmSuccess”: true,

“Exception”: null

}

}

TYPE:

System.String

i want to read the value of “Status” as if this value is true need to perform some operation.

It’s exactly what JSON.NET is for. You pass a JSON string to JsonConvert.DeserializeObject(), JObject.Parse() or so and the string gets deserialized to an object. Maybe you can simply stop converting JObject to string - you might be able to use it directly.

You may want to write a simple facade in .NET, because .NET Interop to X++ doesn’t support things like generic methods.