
public
DataContractJsonSerializer(Type type, string rootName, IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, IDataContractSurrogate dataContractSurrogate, bool alwaysEmitTypeInformation);
Initializes a new instance of the System.Runtime.Serialization.Json.DataContractJsonSerializer 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.
Полное описание ...
Parameters:
type:
The type of the instances that is serialized or deserialized.
rootName:
The name of the XML element that encloses the content to serialize or deserialize.
The default is "root".
knownTypes:
An System.Collections.Generic.IEnumerable<T> of System.Type that contains
the types that may be present in the object graph.
maxItemsInObjectGraph:
The maximum number of items in the graph to serialize or deserialize. The
default is the value returned by the System.Int32.MaxValue property.
ignoreExtensionDataObject:
true to ignore the System.Runtime.Serialization.IExtensibleDataObject interface
upon serialization and ignore unexpected data upon deserialization; otherwise,
false. The default is false.
dataContractSurrogate:
An implementation of the System.Runtime.Serialization.IDataContractSurrogate
to customize the serialization process.
alwaysEmitTypeInformation:
true to emit type information; otherwise, false. The default is false.