Deserializing JSON array into strongly typed .NET object

前端 未结 8 747
一个人的身影
一个人的身影 2020-11-30 07:35

When I can call the 3rd party api and get back a single class worth of data everything deserialises fine using this code

TheUser me = jsonSerializer.Deseria         


        
8条回答
  •  暖寄归人
    2020-11-30 07:57

    This worked for me for deserializing JSON into an array of objects:

    List friends = JsonConvert.DeserializeObject>(response);
    

提交回复
热议问题