如何使用JSON.NET反序列化?

如何使用JSON.NET反序列化?

问题描述:

如何设置Newtonsoft Json.net将该文本反序列化为.NET对象?

How do I setup Newtonsoft Json.net to deserialize this text into a .NET object?

[
    [
        "US\/Hawaii", 
        "GMT-10:00 - Hawaii"
    ], 
    [
        "US\/Alaska", 
        "GMT-09:00 - Alaska"
    ], 
]

对于奖励积分,杰森所说的这种结构是什么.我尝试寻找匿名对象,但没有任何运气.

For bonus points, what is this kind of structure called in Json. I tried looking for anonymous objects, but didn't have any luck.

JSON.Net使用JArray允许对其进行解析-请参阅:

JSON.Net uses JArray to allow these to be parsed - see:

  • Deserializing variable Type JSON array using DataContractJsonSerializer (the questions is about DataContract - but the answer is about JSON.Net - and is from JSON.Net's author)
  • Json.NET: serializing/deserializing arrays