using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace NEducation.Models { public class MpsReq { public String msisdn { get; set; } public String subServiceCode { get; set; } public String requestId { get; set; } public String otp { get; set; } } public class MpsRes { public String requestID { get; set; } public String responseCode { get; set; } public String msisdn { get; set; } public String cmd { get; set; } public String money { get; set; } public String source { get; set; } public String otpType { get; set; } public MpsRes() { } public MpsRes(string json) { JObject jObject = JObject.Parse(json); if (jObject != null) { requestID = (string)jObject["requestID"]; responseCode = (string)jObject["responseCode"]; msisdn = (string)jObject["msisdn"]; cmd = (string)jObject["cmd"]; money = (string)jObject["money"]; source = (string)jObject["source"]; otpType = (string)jObject["otpType"]; } } } }