System.Runtime.Serialization 4.0.0.0 System.Runtime.Serialization.XmlObjectSerializer

Use the class to serialize instances of a type into a JSON document and to deserialize a JSON document into an instance of a type. For example, you can create a type named Person with properties that contain essential data, such as a name and address. You can then create and manipulate an instance of the Person class and write all of its property values in a JSON document for later retrieval. This JSON document can later be deserialized into the Person class or another class with an equivalent data contract.

If an error occurs during the serialization of an outgoing reply on the server or the reply operation throws an exception for some other reason, it may not get returned to the client as a fault.

Serializes objects to the JavaScript Object Notation (JSON) and deserializes JSON data to objects. This class cannot be inherited.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of the specified type.

  The type of the instances that is serialized or deserialized.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of the specified type, with a collection of known types that may be present in the object graph.

  The type of the instances that are serialized or deserialized.
  An of that contains the types that may be present in the object graph.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of the specified type and serializer settings.

  The type of the instances that is serialized or deserialized.
  The serializer settings for the JSON serializer.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of a specified type using the XML root element specified by a parameter.

  The type of the instances that is serialized or deserialized.
  The name of the XML element that encloses the content to serialize or deserialize.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of a specified type using the XML root element specified by a parameter of type .

  The type of the instances that is serialized or deserialized.
  An that contains the root element name of the content.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of a specified type using the XML root element specified by a parameter, with a collection of known types that may be present in the object graph.

  The type of the instances that is serialized or deserialized.
  The name of the XML element that encloses the content to serialize or deserialize. The default is "root".
  An of that contains the types that may be present in the object graph.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of a specified type using the XML root element specified by a parameter of type , with a collection of known types that may be present in the object graph.

  The type of the instances that is serialized or deserialized.
  An that contains the root element name of the content.
  An of that contains the types that may be present in the object graph.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of the specified type. This method also specifies a list of known types that may be present in the object graph, the maximum number of graph items to serialize or deserialize, whether to ignore unexpected data or emit type information, and a surrogate for custom serialization.

  The type of the instances that is serialized or deserialized.
  An that contains the root element name of the content.
  An of that contains the types that may be present in the object graph.
  true to ignore the interface upon serialization and ignore unexpected data upon deserialization; otherwise, false. The default is false.
  An implementation of the to customize the serialization process.
  true to emit type information; otherwise, false. The default is false.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of the specified type. This method also specifies the root name of the XML element, a list of known types that may be present in the object graph, the maximum number of graph items to serialize or deserialize, whether to ignore unexpected data or emit type information, and a surrogate for custom serialization.

  The type of the instances that is serialized or deserialized.
  The name of the XML element that encloses the content to serialize or deserialize. The default is "root".
  An of that contains the types that may be present in the object graph.
  The maximum number of items in the graph to serialize or deserialize. The default is the value returned by the property.
  true to ignore the interface upon serialization and ignore unexpected data upon deserialization; otherwise, false. The default is false.
  An implementation of the to customize the serialization process.
  true to emit type information; otherwise, false. The default is false.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class to serialize or deserialize an object of the specified type. This method also specifies the root name of the XML element, a list of known types that may be present in the object graph, the maximum number of graph items to serialize or deserialize, whether to ignore unexpected data or emit type information, and a surrogate for custom serialization.

  The type of the instances that are serialized or deserialized.
  An that contains the root element name of the content.
  An of that contains the known types that may be present in the object graph.
  The maximum number of items in the graph to serialize or deserialize. The default is the value returned by the property.
  true to ignore the interface upon serialization and ignore unexpected data upon deserialization; otherwise, false. The default is false.
  An implementation of the to customize the serialization process.
  true to emit type information; otherwise, false. The default is false.
- Property
  4.0.0.0
  System.Runtime.Serialization.IDataContractSurrogate To be added.

  The can be used to customize how instances of a type are serialized and deserialized. For example, it can be used to enable serialization of legacy types that are not serializable, that is, types to which the attribute has not been applied.

  Gets a surrogate type that is currently active for a given instance. Surrogates can extend the serialization or deserialization process.

- Property
  4.0.0.0
  System.Runtime.Serialization.DateTimeFormat To be added. To be added.

  Gets the format of the date and time type items in object graph.

- Property
  4.0.0.0
  System.Runtime.Serialization.EmitTypeInformation To be added. To be added.

  Gets or sets the data contract JSON serializer settings to emit type information.

- Property
  4.0.0.0
  System.Boolean To be added.

  The property affects types to which a attribute has been applied and that also implement the interface. In this case when is true, data added in future versions of the contract is ignored on read and write. crdefault Forward Compatible Data Contracts.

  Gets a value that specifies whether unknown data is ignored on deserialization and whether the interface is ignored on serialization.

- Method
  4.0.0.0
  System.Boolean ``

  The determines whether it can read a object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name can be set with the value passed into the constructor (if present), or is "root" if absent. The expected namespace is the empty string.

  Note that this method is intended for advanced scenarios when working with XML mapped from JSON.

  Gets a value that specifies whether the is positioned over an XML element that represents an object the serializer can deserialize from.

  true if the reader is positioned correctly; otherwise, false.

  The used to read the XML stream mapped from JSON.
- Method
  4.0.0.0
  System.Boolean ``

  This method checks whether the reader is positioned on an element that can be deserialized, and returns true if it is. To return true, the found element must have the expected name.

  Determines whether the is positioned on an object that can be deserialized.

  true if the reader is positioned correctly; otherwise, false.

  The used to read the XML stream.
- Property
  4.0.0.0
  System.Collections.ObjectModel.ReadOnlyCollection<System.Type> To be added. To be added.

  Gets a collection of types that may be present in the object graph serialized using this instance of the .

- Property
  4.0.0.0
  System.Int32 To be added.

  This property can be set using a constructor. For a list, see .

  The property specifies the maximum number of objects that the serializer serializes or deserializes in a single or method call. The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects. The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation, so this quota alone may not be sufficient to prevent Denial of Service attacks. crdefault Security Considerations for Data. If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data.

  Gets the maximum number of items in an object graph that the serializer serializes or deserializes in one read or write call.

- Method
  4.0.0.0
  System.Object `` To be added.

  Reads a document stream in the JSON (JavaScript Object Notation) format and returns the deserialized object.

  The deserialized object.

  The to be read.
- Method
  4.0.0.0
  System.Object `` To be added.

  Reads the XML document mapped from JSON (JavaScript Object Notation) with an and returns the deserialized object.

  The deserialized object.

  An used to read the XML document mapped from JSON.
- Method
  4.0.0.0
  System.Object `` To be added.

  Reads the XML document mapped from JSON (JavaScript Object Notation) with an and returns the deserialized object.

  The deserialized object.

  An used to read the XML document mapped from JSON.
- Method
  4.0.0.0
  System.Object `` `` To be added.

  Reads the XML document mapped from JSON with an and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

  The deserialized object.

  An used to read the XML document mapped from JSON. true to check whether the enclosing XML element name and namespace correspond to the expected name and namespace; otherwise, false to skip the verification. The default is true.
- Method
  4.0.0.0
  System.Object `` `` To be added.

  Reads an XML document mapped from JSON with an and returns the deserialized object; it also enables you to specify whether the serializer should verify that it is positioned on an appropriate element before attempting to deserialize.

  The deserialized object.

  An used to read the XML document mapped from JSON. true to check whether the enclosing XML element name and namespace correspond to the expected name and namespace; otherwise, false, which skips the verification. The default is true.
- Property
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets or sets a value that specifies whether to serialize read only types.

- Property
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets or sets a value that specifies whether to use a simple dictionary format.

- Method
  4.0.0.0
  System.Void ``

  Note that this method is intended for advanced scenarios when working with XML mapped from JSON.

  Writes the closing XML element to an XML document, using an , which can be mapped to JavaScript Object Notation (JSON).

  An used to write the XML document to map to JSON.
- Method
  4.0.0.0
  System.Void `` To be added.

  Writes the closing XML element to an XML document, using an , which can be mapped to JavaScript Object Notation (JSON).

  An used to write the XML document mapped to JSON.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Serializes a specified object to JavaScript Object Notation (JSON) data and writes the resulting JSON to a stream.

  The that is written to. The object that contains the data to write to the stream.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Serializes an object to XML that may be mapped to JavaScript Object Notation (JSON). Writes all the object data, including the starting XML element, content, and closing element, with an .

  The used to write the XML document or stream to map to JSON. The object that contains the data to write.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Serializes an object to XML that may be mapped to JavaScript Object Notation (JSON). Writes all the object data, including the starting XML element, content, and closing element, with an .

  The used to write the XML document to map to JSON. The object that contains the data to write.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Writes the XML content that can be mapped to JavaScript Object Notation (JSON) using an .

  The to write to. The object to write.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Writes the XML content that can be mapped to JavaScript Object Notation (JSON) using an .

  The used to write to. The object to write.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Writes the opening XML element for serializing an object to XML that can be mapped to JavaScript Object Notation (JSON) using an .

  The used to write the XML start element. The object to write.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Writes the opening XML element for serializing an object to XML that can be mapped to JavaScript Object Notation (JSON) using an .

  The used to write the XML start element. The object to write.