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
Post a Comment