JsonSerializer.SerializeToNode Méthode

Définition

Surcharges

Nom Description
SerializeToNode(Object, JsonTypeInfo)

Convertit la valeur fournie en un JsonNode.

SerializeToNode(Object, Type, JsonSerializerOptions)

Convertit la valeur fournie en un JsonNode.

SerializeToNode(Object, Type, JsonSerializerContext)

Convertit la valeur fournie en un JsonNode.

SerializeToNode<TValue>(TValue, JsonSerializerOptions)

Convertit la valeur fournie en un JsonNode.

SerializeToNode<TValue>(TValue, JsonTypeInfo<TValue>)

Convertit la valeur fournie en un JsonNode.

SerializeToNode(Object, JsonTypeInfo)

Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs

Convertit la valeur fournie en un JsonNode.

public:
 static System::Text::Json::Nodes::JsonNode ^ SerializeToNode(System::Object ^ value, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static System.Text.Json.Nodes.JsonNode? SerializeToNode(object? value, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member SerializeToNode : obj * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> System.Text.Json.Nodes.JsonNode
Public Function SerializeToNode (value As Object, jsonTypeInfo As JsonTypeInfo) As JsonNode

Paramètres

value
Object

Valeur à convertir.

jsonTypeInfo
JsonTypeInfo

Métadonnées sur le type à convertir.

Retours

Représentation JsonNode de la valeur.

Exceptions

jsonTypeInfo a la valeur null.

value ne correspond pas au type de jsonTypeInfo.

S’applique à

SerializeToNode(Object, Type, JsonSerializerOptions)

Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs

Convertit la valeur fournie en un JsonNode.

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Text.Json.Nodes.JsonNode? SerializeToNode(object? value, Type inputType, System.Text.Json.JsonSerializerOptions? options = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Text.Json.Nodes.JsonNode? SerializeToNode(object? value, Type inputType, System.Text.Json.JsonSerializerOptions? options = default);
public static System.Text.Json.Nodes.JsonNode? SerializeToNode(object? value, Type inputType, System.Text.Json.JsonSerializerOptions? options = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member SerializeToNode : obj * Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Nodes.JsonNode
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member SerializeToNode : obj * Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Nodes.JsonNode
static member SerializeToNode : obj * Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Nodes.JsonNode
Public Function SerializeToNode (value As Object, inputType As Type, Optional options As JsonSerializerOptions = Nothing) As JsonNode

Paramètres

value
Object

Valeur à convertir.

inputType
Type

Type de la value conversion.

options
JsonSerializerOptions

Options permettant de contrôler le comportement de conversion.

Retours

Représentation JsonNode de la valeur.

Attributs

Exceptions

inputType n’est pas compatible avec value.

inputType a la valeur null.

Il n’existe aucune compatibilité JsonConverter pour inputType ses membres sérialisables.

S’applique à

SerializeToNode(Object, Type, JsonSerializerContext)

Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs

Convertit la valeur fournie en un JsonNode.

public:
 static System::Text::Json::Nodes::JsonNode ^ SerializeToNode(System::Object ^ value, Type ^ inputType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static System.Text.Json.Nodes.JsonNode? SerializeToNode(object? value, Type inputType, System.Text.Json.Serialization.JsonSerializerContext context);
static member SerializeToNode : obj * Type * System.Text.Json.Serialization.JsonSerializerContext -> System.Text.Json.Nodes.JsonNode
Public Function SerializeToNode (value As Object, inputType As Type, context As JsonSerializerContext) As JsonNode

Paramètres

value
Object

Valeur à convertir.

inputType
Type

Type de la value conversion.

context
JsonSerializerContext

Fournisseur de métadonnées pour les types sérialisables.

Retours

Représentation JsonNode de la valeur.

Exceptions

Il n’existe aucune compatibilité JsonConverter pour inputType ses membres sérialisables.

Méthode GetTypeInfo(Type) des retours null fournis context pour le type à convertir.

inputType ou context est null.

S’applique à

SerializeToNode<TValue>(TValue, JsonSerializerOptions)

Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs

Convertit la valeur fournie en un JsonNode.

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Text.Json.Nodes.JsonNode? SerializeToNode<TValue>(TValue value, System.Text.Json.JsonSerializerOptions? options = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Text.Json.Nodes.JsonNode? SerializeToNode<TValue>(TValue value, System.Text.Json.JsonSerializerOptions? options = default);
public static System.Text.Json.Nodes.JsonNode? SerializeToNode<TValue>(TValue value, System.Text.Json.JsonSerializerOptions? options = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member SerializeToNode : 'Value * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Nodes.JsonNode
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member SerializeToNode : 'Value * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Nodes.JsonNode
static member SerializeToNode : 'Value * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Nodes.JsonNode
Public Function SerializeToNode(Of TValue) (value As TValue, Optional options As JsonSerializerOptions = Nothing) As JsonNode

Paramètres de type

TValue

Type de la valeur à sérialiser.

Paramètres

value
TValue

Valeur à convertir.

options
JsonSerializerOptions

Options permettant de contrôler le comportement de conversion.

Retours

Représentation JsonNode de la valeur JSON.

Attributs

Exceptions

Il n’existe aucune compatibilité JsonConverter pour TValue ses membres sérialisables.

S’applique à

SerializeToNode<TValue>(TValue, JsonTypeInfo<TValue>)

Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs
Source:
JsonSerializer.Write.Node.cs

Convertit la valeur fournie en un JsonNode.

public:
generic <typename TValue>
 static System::Text::Json::Nodes::JsonNode ^ SerializeToNode(TValue value, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static System.Text.Json.Nodes.JsonNode? SerializeToNode<TValue>(TValue value, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member SerializeToNode : 'Value * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> System.Text.Json.Nodes.JsonNode
Public Function SerializeToNode(Of TValue) (value As TValue, jsonTypeInfo As JsonTypeInfo(Of TValue)) As JsonNode

Paramètres de type

TValue

Type de la valeur à sérialiser.

Paramètres

value
TValue

Valeur à convertir.

jsonTypeInfo
JsonTypeInfo<TValue>

Métadonnées sur le type à convertir.

Retours

Représentation JsonNode de la valeur.

Exceptions

Il n’existe aucune compatibilité JsonConverter pour TValue ses membres sérialisables.

jsonTypeInfo a la valeur null.

S’applique à