Deserialize JSON array(or list) in C#

前端 未结 3 964
無奈伤痛
無奈伤痛 2020-12-06 00:43

here is the basic code:

public static string DeserializeNames()
{

    jsonData = \"{\\\"name\\\":[{\\\"last\\\":\\\"Smith\\\"},{\\\"last\\\":\\\"Doe\\\"}]}\         


        
3条回答
  •  天命终不由人
    2020-12-06 01:21

    Download Json.NET from here http://james.newtonking.com/projects/json-net.aspx

    name deserializedName = JsonConvert.DeserializeObject(jsonData);
    

提交回复
热议问题