Monday, September 24, 2018

c# - How to deserialize with JSON.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.


Answer



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





No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...