Organizational Research By

Surprising Reserch Topic

how to convert namevaluecollection to json string


how to convert namevaluecollection to json string  using -'c#,.net,asp.net,json,namevaluecollection'

I tried:

  NameValueCollection Data = new NameValueCollection();
  Data.Add("foo","baa");
  string json = new JavaScriptSerializer().Serialize(Data);


it returns: ["foo"] I expected {"foo" : "baa"}
How do I to do this?
    

asked Oct 6, 2015 by abhi
0 votes
69 views



Related Hot Questions

2 Answers

0 votes
NULL
answered Oct 6, 2015 by patilkiran.101
0 votes
NULL
answered Oct 6, 2015 by yashwantpinge

...