DataContractJsonSerializer Constructor
Initializes a new instance of the DataContractJsonSerializer class.
Assembly: System.Runtime.Serialization (in System.Runtime.Serialization.dll)
| Name | Description | |
|---|---|---|
![]() | DataContractJsonSerializer(Type^) | Initializes a new instance of the DataContractJsonSerializer class to serialize or deserialize an object of the specified type. |
![]() | DataContractJsonSerializer(Type^, DataContractJsonSerializerSettings^) | Initializes a new instance of the DataContractJsonSerializer class to serialize or deserialize an object of the specified type and serializer settings. |
![]() | DataContractJsonSerializer(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. |
![]() | DataContractJsonSerializer(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. |
![]() | DataContractJsonSerializer(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. |
![]() | DataContractJsonSerializer(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. |
![]() | DataContractJsonSerializer(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. |
![]() | DataContractJsonSerializer(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. |
![]() | DataContractJsonSerializer(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. |
![]() | DataContractJsonSerializer(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. |
