<?xml version="1.0" encoding="utf-8"?>
<topic id="JsonNetVsDotNetSerializers" revisionNumber="1">
  <developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
    <introduction>
      <para>Json.NET offers many features not found in the JavaScriptSerializer and DataContractSerializer that come with .NET.</para>
    </introduction>
    <section>
      <title>Feature Comparison</title>
      <content>
<table>
  <tableHeader>
    <row>
      <entry><para></para></entry>
      <entry><para>Json.NET</para></entry>
      <entry><para>DataContractJsonSerializer</para></entry>
      <entry><para>JavaScriptSerializer</para></entry>
    </row>
  </tableHeader>
  <row>
    <entry><para>Supports JSON</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports BSON</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports JSON Schema</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports .NET 2.0</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports .NET 3.5</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports .NET 4.0</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports Silverlight</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports Windows Phone</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports WinRT</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Open Source</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>MIT License</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>LINQ to JSON</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Thread Safe</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>XPath-like JSON query syntax</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Indented JSON support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>
    <externalLink>
		<linkText>Efficient dictionary serialization</linkText>
		<linkUri>http://stackoverflow.com/questions/1207731/how-can-i-deserialize-json-to-a-simple-dictionarystring-string-in-asp-net</linkUri>
		<linkTarget>_blank</linkTarget>
	</externalLink>
    </para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>
    <externalLink>
		<linkText>Nonsensical dictionary serialization</linkText>
		<linkUri>http://stackoverflow.com/questions/4559991/any-way-to-make-datacontractjsonserializer-serialize-dictionaries-properly</linkUri>
		<linkTarget>_blank</linkTarget>
	</externalLink>
    </para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Deserializes IList, IEnumerable, ICollection, IDictionary properties</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serializes circular references</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports serializing objects by reference</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Deserializes polymorphic properties and collections</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serializes and deserializes multidimensional arrays</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports including type names with JSON</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Globally customize serialization process</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports excluding null values when serializing</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports SerializationBinder</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Conditional property serialization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Includes line number information in errors</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Converts XML to JSON and JSON to XML</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>JSON Schema validation</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>JSON Schema generation from .NET types</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Camel case JSON property names</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Non-default constructors support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serialization error handling</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports populating an existing object</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Efficiently serializes byte arrays as base64 text</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Handles NaN, Infinity, -Infinity and undefined</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Handles JavaScript constructors</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serializes .NET 4.0 dynamic objects</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serializes ISerializable objects</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports serializing enums to their text name</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>JSON recursion limit support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Attribute property name customization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Attribute property order customization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Attribute property required customization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports ISO8601 dates</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports JavaScript constructor dates</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports Microsoft AJAX dates</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Unquoted property names support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Raw JSON support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports reading and writing comments</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serializes anonymous types</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Deserializes anonymous types</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Opt-in mode serialization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Opt-out mode serialization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Field (Serializable) mode serialization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Efficiently stream reading and writing JSON</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Single or double quote JSON content</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports overriding a type&apos;s serialization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports OnDeserialized, OnSerializing, OnSerialized and OnDeserializing attributes</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Supports serializing private properties</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>DataMember attribute support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>MetdataType attribute support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>DefaultValue attribute support</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serializes DataSets and DataTables</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serailizes Entity Framework</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Serializes nHibernate</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
  <row>
    <entry><para>Case-insensitive property deserialization</para></entry>
    <entry><para><markup><img src="../tick.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
    <entry><para><markup><img src="../cross.png" /></markup></para></entry>
  </row>
</table>  
      </content>
    </section>
    <section>
      <title>Benchmarks</title>
      <content>
        
	<mediaLink>
      <image class="image" xlink:href="performance" mimeType="image/png" width="643" height="345" />
      <summary>Json.NET Performance</summary>
	</mediaLink>
        
      </content>
    </section>
  </developerConceptualDocument>
</topic>