Język

DataContractJsonSerializer Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy DataContractJsonSerializer.

Przeciążenia

Nazwa Opis
DataContractJsonSerializer(Type)

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu.

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

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu. Ta metoda określa również nazwę główną elementu XML, listę znanych typów, które mogą być obecne na grafie obiektu, maksymalną liczbę elementów grafu do serializacji lub deserializacji, czy ignorować nieoczekiwane dane lub emitować informacje o typie oraz zastępcę niestandardowej serializacji.

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

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu. Ta metoda określa również listę znanych typów, które mogą być obecne na grafie obiektu, maksymalną liczbę elementów grafu do serializacji lub deserializacji, czy ignorować nieoczekiwane dane lub emitować informacje o typie oraz zastępcę niestandardowej serializacji.

DataContractJsonSerializer(Type, XmlDictionaryString, IEnumerable<Type>)

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy w celu serializacji lub deserializacji obiektu określonego typu przy użyciu elementu głównego XML określonego typu określonego przez parametr typu XmlDictionaryString, z kolekcją znanych typów, które mogą być obecne na grafie obiektu.

DataContractJsonSerializer(Type, String, IEnumerable<Type>)

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu przy użyciu elementu głównego XML określonego przez parametr, z kolekcją znanych typów, które mogą być obecne na grafie obiektu.

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

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu. Ta metoda określa również nazwę główną elementu XML, listę znanych typów, które mogą być obecne na grafie obiektu, maksymalną liczbę elementów grafu do serializacji lub deserializacji, czy ignorować nieoczekiwane dane lub emitować informacje o typie oraz zastępcę niestandardowej serializacji.

DataContractJsonSerializer(Type, String)

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy w celu serializacji lub deserializacji obiektu określonego typu przy użyciu elementu głównego XML określonego parametru.

DataContractJsonSerializer(Type, DataContractJsonSerializerSettings)

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu i ustawień serializatora.

DataContractJsonSerializer(Type, IEnumerable<Type>)

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu, z kolekcją znanych typów, które mogą być obecne na grafie obiektu.

DataContractJsonSerializer(Type, XmlDictionaryString)

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy w celu serializacji lub deserializowania obiektu określonego typu przy użyciu elementu głównego XML określonego typu określonego przez parametr typu XmlDictionaryString.

DataContractJsonSerializer(Type)

Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu.

public:
 DataContractJsonSerializer(Type ^ type);
public DataContractJsonSerializer(Type type);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type);
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type)

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

Atrybuty

Dotyczy

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

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu. Ta metoda określa również nazwę główną elementu XML, listę znanych typów, które mogą być obecne na grafie obiektu, maksymalną liczbę elementów grafu do serializacji lub deserializacji, czy ignorować nieoczekiwane dane lub emitować informacje o typie oraz zastępcę niestandardowej serializacji.

public:
 DataContractJsonSerializer(Type ^ type, System::Xml::XmlDictionaryString ^ rootName, System::Collections::Generic::IEnumerable<Type ^> ^ knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, System::Runtime::Serialization::IDataContractSurrogate ^ dataContractSurrogate, bool alwaysEmitTypeInformation);
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString rootName, System.Collections.Generic.IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, System.Runtime.Serialization.IDataContractSurrogate dataContractSurrogate, bool alwaysEmitTypeInformation);
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Xml.XmlDictionaryString * seq<Type> * int * bool * System.Runtime.Serialization.IDataContractSurrogate * bool -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, rootName As XmlDictionaryString, knownTypes As IEnumerable(Of Type), maxItemsInObjectGraph As Integer, ignoreExtensionDataObject As Boolean, dataContractSurrogate As IDataContractSurrogate, alwaysEmitTypeInformation As Boolean)

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

rootName
XmlDictionaryString

Element XmlDictionaryString zawierający nazwę elementu głównego zawartości.

knownTypes
IEnumerable<Type>

IEnumerable<T> Element Type zawierający znane typy, które mogą znajdować się na grafie obiektu.

maxItemsInObjectGraph
Int32

Maksymalna liczba elementów na grafie do serializacji lub deserializacji. Wartość domyślna to wartość zwracana przez właściwość Int32.MaxValue .

ignoreExtensionDataObject
Boolean

trueaby zignorować IExtensibleDataObject interfejs podczas serializacji i zignorować nieoczekiwane dane podczas deserializacji; w przeciwnym razie . false Wartość domyślna to false.

dataContractSurrogate
IDataContractSurrogate

Implementacja IDataContractSurrogate elementu w celu dostosowania procesu serializacji.

alwaysEmitTypeInformation
Boolean

true emitować informacje o typie; w przeciwnym razie, false. Wartość domyślna to false.

Dotyczy

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

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu. Ta metoda określa również listę znanych typów, które mogą być obecne na grafie obiektu, maksymalną liczbę elementów grafu do serializacji lub deserializacji, czy ignorować nieoczekiwane dane lub emitować informacje o typie oraz zastępcę niestandardowej serializacji.

public:
 DataContractJsonSerializer(Type ^ type, System::Collections::Generic::IEnumerable<Type ^> ^ knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, System::Runtime::Serialization::IDataContractSurrogate ^ dataContractSurrogate, bool alwaysEmitTypeInformation);
public DataContractJsonSerializer(Type type, System.Collections.Generic.IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, System.Runtime.Serialization.IDataContractSurrogate dataContractSurrogate, bool alwaysEmitTypeInformation);
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * seq<Type> * int * bool * System.Runtime.Serialization.IDataContractSurrogate * bool -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, knownTypes As IEnumerable(Of Type), maxItemsInObjectGraph As Integer, ignoreExtensionDataObject As Boolean, dataContractSurrogate As IDataContractSurrogate, alwaysEmitTypeInformation As Boolean)

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

knownTypes
IEnumerable<Type>

Element XmlDictionaryString zawierający nazwę elementu głównego zawartości.

maxItemsInObjectGraph
Int32

IEnumerable<T> Element Type zawierający typy, które mogą znajdować się na grafie obiektu.

ignoreExtensionDataObject
Boolean

trueaby zignorować IExtensibleDataObject interfejs podczas serializacji i zignorować nieoczekiwane dane podczas deserializacji; w przeciwnym razie . false Wartość domyślna to false.

dataContractSurrogate
IDataContractSurrogate

Implementacja IDataContractSurrogate elementu w celu dostosowania procesu serializacji.

alwaysEmitTypeInformation
Boolean

true emitować informacje o typie; w przeciwnym razie, false. Wartość domyślna to false.

Dotyczy

DataContractJsonSerializer(Type, XmlDictionaryString, IEnumerable<Type>)

Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy w celu serializacji lub deserializacji obiektu określonego typu przy użyciu elementu głównego XML określonego typu określonego przez parametr typu XmlDictionaryString, z kolekcją znanych typów, które mogą być obecne na grafie obiektu.

public:
 DataContractJsonSerializer(Type ^ type, System::Xml::XmlDictionaryString ^ rootName, System::Collections::Generic::IEnumerable<Type ^> ^ knownTypes);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString? rootName, System.Collections.Generic.IEnumerable<Type>? knownTypes);
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString? rootName, System.Collections.Generic.IEnumerable<Type>? knownTypes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString? rootName, System.Collections.Generic.IEnumerable<Type>? knownTypes);
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString rootName, System.Collections.Generic.IEnumerable<Type> knownTypes);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Xml.XmlDictionaryString * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Xml.XmlDictionaryString * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Xml.XmlDictionaryString * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, rootName As XmlDictionaryString, knownTypes As IEnumerable(Of Type))

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

rootName
XmlDictionaryString

Element XmlDictionaryString zawierający nazwę elementu głównego zawartości.

knownTypes
IEnumerable<Type>

IEnumerable<T> Element Type zawierający typy, które mogą znajdować się na grafie obiektu.

Atrybuty

Dotyczy

DataContractJsonSerializer(Type, String, IEnumerable<Type>)

Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu przy użyciu elementu głównego XML określonego przez parametr, z kolekcją znanych typów, które mogą być obecne na grafie obiektu.

public:
 DataContractJsonSerializer(Type ^ type, System::String ^ rootName, System::Collections::Generic::IEnumerable<Type ^> ^ knownTypes);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, string? rootName, System.Collections.Generic.IEnumerable<Type>? knownTypes);
public DataContractJsonSerializer(Type type, string? rootName, System.Collections.Generic.IEnumerable<Type>? knownTypes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, string? rootName, System.Collections.Generic.IEnumerable<Type>? knownTypes);
public DataContractJsonSerializer(Type type, string rootName, System.Collections.Generic.IEnumerable<Type> knownTypes);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * string * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * string * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * string * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, rootName As String, knownTypes As IEnumerable(Of Type))

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

rootName
String

Nazwa elementu XML, który otacza zawartość serializacji lub deserializacji. Wartość domyślna to "root".

knownTypes
IEnumerable<Type>

IEnumerable<T> Element Type zawierający typy, które mogą znajdować się na grafie obiektu.

Atrybuty

Dotyczy

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

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu. Ta metoda określa również nazwę główną elementu XML, listę znanych typów, które mogą być obecne na grafie obiektu, maksymalną liczbę elementów grafu do serializacji lub deserializacji, czy ignorować nieoczekiwane dane lub emitować informacje o typie oraz zastępcę niestandardowej serializacji.

public:
 DataContractJsonSerializer(Type ^ type, System::String ^ rootName, System::Collections::Generic::IEnumerable<Type ^> ^ knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, System::Runtime::Serialization::IDataContractSurrogate ^ dataContractSurrogate, bool alwaysEmitTypeInformation);
public DataContractJsonSerializer(Type type, string rootName, System.Collections.Generic.IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, System.Runtime.Serialization.IDataContractSurrogate dataContractSurrogate, bool alwaysEmitTypeInformation);
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * string * seq<Type> * int * bool * System.Runtime.Serialization.IDataContractSurrogate * bool -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, rootName As String, knownTypes As IEnumerable(Of Type), maxItemsInObjectGraph As Integer, ignoreExtensionDataObject As Boolean, dataContractSurrogate As IDataContractSurrogate, alwaysEmitTypeInformation As Boolean)

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

rootName
String

Nazwa elementu XML, który otacza zawartość serializacji lub deserializacji. Wartość domyślna to "root".

knownTypes
IEnumerable<Type>

IEnumerable<T> Element Type zawierający typy, które mogą znajdować się na grafie obiektu.

maxItemsInObjectGraph
Int32

Maksymalna liczba elementów na grafie do serializacji lub deserializacji. Wartość domyślna to wartość zwracana przez właściwość Int32.MaxValue .

ignoreExtensionDataObject
Boolean

trueaby zignorować IExtensibleDataObject interfejs podczas serializacji i zignorować nieoczekiwane dane podczas deserializacji; w przeciwnym razie . false Wartość domyślna to false.

dataContractSurrogate
IDataContractSurrogate

Implementacja IDataContractSurrogate elementu w celu dostosowania procesu serializacji.

alwaysEmitTypeInformation
Boolean

true emitować informacje o typie; w przeciwnym razie, false. Wartość domyślna to false.

Dotyczy

DataContractJsonSerializer(Type, String)

Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy w celu serializacji lub deserializacji obiektu określonego typu przy użyciu elementu głównego XML określonego parametru.

public:
 DataContractJsonSerializer(Type ^ type, System::String ^ rootName);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, string? rootName);
public DataContractJsonSerializer(Type type, string? rootName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, string? rootName);
public DataContractJsonSerializer(Type type, string rootName);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * string -> System.Runtime.Serialization.Json.DataContractJsonSerializer
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * string -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * string -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, rootName As String)

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

rootName
String

Nazwa elementu XML, który otacza zawartość serializacji lub deserializacji.

Atrybuty

Dotyczy

DataContractJsonSerializer(Type, DataContractJsonSerializerSettings)

Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu i ustawień serializatora.

public:
 DataContractJsonSerializer(Type ^ type, System::Runtime::Serialization::Json::DataContractJsonSerializerSettings ^ settings);
public DataContractJsonSerializer(Type type, System.Runtime.Serialization.Json.DataContractJsonSerializerSettings settings);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Runtime.Serialization.Json.DataContractJsonSerializerSettings? settings);
public DataContractJsonSerializer(Type type, System.Runtime.Serialization.Json.DataContractJsonSerializerSettings? settings);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Runtime.Serialization.Json.DataContractJsonSerializerSettings? settings);
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Runtime.Serialization.Json.DataContractJsonSerializerSettings -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Runtime.Serialization.Json.DataContractJsonSerializerSettings -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Runtime.Serialization.Json.DataContractJsonSerializerSettings -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, settings As DataContractJsonSerializerSettings)

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

settings
DataContractJsonSerializerSettings

Ustawienia serializatora dla serializatora JSON.

Atrybuty

Dotyczy

DataContractJsonSerializer(Type, IEnumerable<Type>)

Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy, aby serializować lub deserializować obiekt określonego typu, z kolekcją znanych typów, które mogą być obecne na grafie obiektu.

public:
 DataContractJsonSerializer(Type ^ type, System::Collections::Generic::IEnumerable<Type ^> ^ knownTypes);
public DataContractJsonSerializer(Type type, System.Collections.Generic.IEnumerable<Type> knownTypes);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Collections.Generic.IEnumerable<Type>? knownTypes);
public DataContractJsonSerializer(Type type, System.Collections.Generic.IEnumerable<Type>? knownTypes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Collections.Generic.IEnumerable<Type>? knownTypes);
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * seq<Type> -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, knownTypes As IEnumerable(Of Type))

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

knownTypes
IEnumerable<Type>

IEnumerable<T> Element Type zawierający typy, które mogą znajdować się na grafie obiektu.

Atrybuty

Dotyczy

DataContractJsonSerializer(Type, XmlDictionaryString)

Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs
Źródło:
DataContractJsonSerializer.cs

Inicjuje nowe wystąpienie DataContractJsonSerializer klasy w celu serializacji lub deserializowania obiektu określonego typu przy użyciu elementu głównego XML określonego typu określonego przez parametr typu XmlDictionaryString.

public:
 DataContractJsonSerializer(Type ^ type, System::Xml::XmlDictionaryString ^ rootName);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString? rootName);
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString? rootName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString? rootName);
public DataContractJsonSerializer(Type type, System.Xml.XmlDictionaryString rootName);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Xml.XmlDictionaryString -> System.Runtime.Serialization.Json.DataContractJsonSerializer
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Xml.XmlDictionaryString -> System.Runtime.Serialization.Json.DataContractJsonSerializer
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
new System.Runtime.Serialization.Json.DataContractJsonSerializer : Type * System.Xml.XmlDictionaryString -> System.Runtime.Serialization.Json.DataContractJsonSerializer
Public Sub New (type As Type, rootName As XmlDictionaryString)

Parametry

type
Type

Typ wystąpień, które są serializowane lub deserializowane.

rootName
XmlDictionaryString

Element XmlDictionaryString zawierający nazwę elementu głównego zawartości.

Atrybuty

Dotyczy