public static void Main()
string jsonString = "{\"data\":{\"merchantRefNo\":\"foo\"," +
"\"responseText\":\"Approved\"," +
"\"txnDate\":\"20220321\"," +
"\"txnId\":\"000067\"," +
"\"txnTime\":\"1049\"," +
"\"txnType\":\"sale\"," +
"\"dataType\":\"trans\"}";
var result =JsonConvert.DeserializeObject<Root>(jsonString);
Console.WriteLine(result.dataType);
Console.WriteLine(result.data.merchantRefNo);
Console.WriteLine(result.data.status);
Console.WriteLine(result.data.txnId);
public string merchantRefNo { get; set; }
public string responseText { get; set; }
public string status { get; set; }
public string txnDate { get; set; }
public string txnId { get; set; }
public string txnTime { get; set; }
public string txnType { get; set; }
public string amt { get; set; }
public Data data { get; set; }
public string dataType { get; set; }