Deserializing JSON to .NET object using Newtonsoft (or LINQ to JSON maybe?)

前端 未结 12 1050
旧巷少年郎
旧巷少年郎 2020-11-22 10:04

I know there are a few posts about Newtonsoft so hopefully this isn\'t exactly a repeat...I\'m trying to convert JSON data returned by Kazaa\'s API into a nice object of som

12条回答
  •  隐瞒了意图╮
    2020-11-22 10:17

    Also, if you're just looking for a specific value nested within the JSON content you can do something like so:

    yourJObject.GetValue("jsonObjectName").Value("jsonPropertyName");
    

    And so on from there.

    This could help if you don't want to bear the cost of converting the entire JSON into a C# object.

提交回复
热议问题