Forums - C# Corner

Forum guidelines
tarun janveja

tarun janveja

  • 1.5k
  • 65
  • 4.9k

json array with json object

Aug 15 2017 1:00 AM
i have below json code i am getting error .input string not in correct format .i require below format .
{"msisdn": ["1234","5432"]} .please rectify my code where i am doing wrong
string data;
List<string> s = new List<string>();
JArray msisdn = new JArray();
JObject o = new JObject();
o["msisdn"] = msisdn;
data = o["msisdn"];
Response.Write(data);   //error --input string is not in correct format

Answers (6)