JSON array to C# List -


how can deserialize simple json string list in c# ?

["on4thnu7","n71yzyvkd","cvfspm2w","10kqotv"] 

such that,

list<string> mystrings = [the content of json above] 

i using datacontractjsonserializer found in system.runtime.serialization.json, , don't need external library.

edit: javascriptserializer found in system.web.script.serialization acceptable.

just this,

  string json = "[\"on4thnu7\",\"n71yzyvkd\",\"cvfspm2w\",\"10kqotv\"]";   var result = new javascriptserializer().deserialize<list<string>>(json); 

Comments

Popular posts from this blog

Prolog - Listing -

orchardcms - change base url in local copy in Orchard CMS -

python - can't seem to get an output from my class -