DataContractJsonSerializer Constructor

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the DataContractJsonSerializer class.

Namespace:   System.Runtime.Serialization.Json
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

NameDescription
System_CAPS_pubmethodDataContractJsonSerializer(Type)

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

System_CAPS_pubmethodDataContractJsonSerializer(Type, DataContractJsonSerializerSettings)

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

System_CAPS_pubmethodDataContractJsonSerializer(Type, IEnumerable<Type>)

Initializes a new instance of the DataContractJsonSerializer 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.

System_CAPS_pubmethodDataContractJsonSerializer(Type, IEnumerable<Type>, Int32, Boolean, IDataContractSurrogate, Boolean)

Initializes a new instance of the DataContractJsonSerializer 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.

System_CAPS_pubmethodDataContractJsonSerializer(Type, String)

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

System_CAPS_pubmethodDataContractJsonSerializer(Type, String, IEnumerable<Type>)

Initializes a new instance of the DataContractJsonSerializer 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.

System_CAPS_pubmethodDataContractJsonSerializer(Type, String, IEnumerable<Type>, Int32, Boolean, IDataContractSurrogate, Boolean)

Initializes a new instance of the 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.

System_CAPS_pubmethodDataContractJsonSerializer(Type, XmlDictionaryString)

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

System_CAPS_pubmethodDataContractJsonSerializer(Type, XmlDictionaryString, IEnumerable<Type>)

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

System_CAPS_pubmethodDataContractJsonSerializer(Type, XmlDictionaryString, IEnumerable<Type>, Int32, Boolean, IDataContractSurrogate, Boolean)

Initializes a new instance of the 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.

Exception Condition
InvalidDataContractException

At least one of the types being serialized or deserialized does not conform to data contract rules. For example, the DataContractAttribute attribute has not been applied to the type.

Return to top
Show: