Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
.NET Framework Class Library for Silverlight
System.Json Namespace
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The System.Json namespace provides standards-based support for the serialization of JavaScript Object Notation (JSON).

JSON is a lightweight, text-based data interchange format that is used to serialize structured data for transmission over networks. It has three primitive data types: string, number, and Boolean. It has two data structures: array and object. An array is an ordered collection of values, where the value can be a JSON primitive or an object or array. An object is an unordered set of key/value pairs. The key is a string and the value, as with the array, can be a JSON primitive, object, or array.

In this documentation, the serialized textual representation of JSON is referred to as “text-based JSON” to distinguish it from the deserialized representation of JSON as a Common Language Runtime (CLR) type, which is referred to here as a “JSON CLR type.”

JSON CLR types represent the three text-based JSON primitives with the JsonPrimitive type. The JsonType()()() property indicates which primitive is contained in the type instance: String, Number, or Boolean.

JSON CLR types represent the two text-based structured types with JsonArray and JsonObject. A JsonArray is an ordered sequence of zero or more JsonValue objects. A JsonValue is the JSON CLR representation of a JSON text-based value, which can be either a primitive or structured type. A JsonObject is an unordered collection of zero or more String/JsonValue pairs, which represent the key/value pairs of the text-based JSON object.

  ClassDescription
JsonArrayA JsonArray is an ordered sequence of zero or more JsonValue objects.
JsonObjectA JsonObject is an unordered collection of zero or more key/value pairs.
JsonPrimitiveRepresents a JavaScript Object Notation (JSON) primitive type in the Common Language Runtime (CLR).
JsonValueThis is the abstract base class for JavaScript Object Notation (JSON) Common Language Runtime (CLR) types.
  EnumerationDescription
JsonTypeAn enumeration that specifies primitive and structured JavaScript Object Notation (JSON) Common Language Runtime (CLR) types.
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker