Windows 8 introduces a new way to work with JSON via the Windows.Data.Json http://msdn.microsoft.com/en-us/library/windows/apps/xaml/br240639.aspx _blank namespace. Similar to LINQ to JSON in Json.NET it defines classes that can be used to parse values, strings, objects, and arrays from JSON text or serialize value types into JSON text.

Below is a comparison of Json.NET's LINQ to JSON to Window 8's Windows.Data.Json.

# Exclusive Json.NET Features

- Runs on .NET 2, .NET 3, .NET 4, Silverlight and Windows Phone 7

- Dynamic programming

- Write indented JSON

- Customize reading and writing JSON with JsonConverters

- Read and write ISO8601 dates

- Better LINQ support

# Creating JSON

The big difference between the two libraries when creating JSON is Windows.Data.Json requires string/integer/double values to be explicitly converted to JsonValue objects.

Note that there is a weird limitation to creating JSON with Windows.Data.Json: it doesn't allow you to set properties to null or put null values in an array.

Creating JSON with Json.NET and Windows.Data.Json

# Querying JSON

Windows.Data.Json requires a value to be cast to its exact type with the GetObject/GetArray methods before it can be used, making Windows.Data.Json's code verbose compared to LINQ to JSON.

Querying JSON with Json.NET and Windows.Data.Json

# Benchmarks

Json.NET is slightly slower at writing JSON than Windows.Data.Json but considerably faster at parsing JSON.

Json.NET and Windows.Data.Json Performance

# Converting Between LINQ to JSON and Windows.Data.Json

Json.NET supports converting between the types of the two libraries. This feature is useful if you are working with another API that uses Windows.Data.Json types but you want to use Json.NET inside your own code.

Use Overload:Newtonsoft.Json.Linq.JToken.FromObject to convert a Windows.Data.Json value to LINQ to JSON and use Overload:Newtonsoft.Json.Linq.JToken.ToObject to convert LINQ to JSON to Windows.Data.Json.

Converting between Json.NET and Windows.Data.Json

N:Newtonsoft.Json.Linq