The example below use JSON formatted data fetched from
Similar to the
DataContractJsonSerializer maps data from a JSON file into
strongly managed objects.
The following classes are used to store the received data in strongly-typed objects. Note the use of the
DataMember attribute to rename the data into the correct naming convention used in .NET.
The following example shows how to take an existing stream and deserialize the JSON data into strongly-typed classes and output the source URL for each photo.
You can also work with JSON data in a weakly typed manner using the
These classes can be used in conjunction with LINQ to iterate over the data. Importing the
System.Json.dll will increase your XAP approximately 21kB.
The following example shows how to take an existing stream, and using the weakly typed JSON classes, sort the results and output some details.
Related information on the web is listed below.