Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

JSON deserialization with JSON.net: class hierarchies

AddThis Social Bookmark Button
In part 1 of this series I described the basics of creating classes from a JSON string and then simply  deserializing the string into a (list of) classes. That way, you don’t have all the hooplah of SOAP, but still have strongly-typed classes in your client app. But beware, there is no formal contract either, so on a beautiful morning you might start to think that either you had too much of a drink yesterday evening, or that the company providing the data feed for your app indeed has started to sell Windows Phone
7 devices made by Sony, with a 65” screen. Looking at the JSON string you now see something like this:[ { "Brand": "Nokia","Type" : "Lumia 800", "Device" : "Phone", "Specs":{"Storage" : "16GB", "Memory": "512MB","Screensize" : "3.7"} }, { "Brand": "Sony", "Type" : "KDL-65HX920","Device" : "TV", "Specs":{"Screensize" : "65", "FullHD" : "Yes", "ThreeD" : "Yes" } }, { "Brand": "Nokia","Type" : "Lumia 900","Device" : "Phone", "Specs":{"Storage" : "8GB", "Memory": "512MB","Screensize" : "4.3" } }, { ...(Read whole news on source site)

Home : Blog List : .NET by Example : JSON deserialization with JSON.net: class hierarchies