Rediger

Del via


JsonSchemaExporter.GetJsonSchemaAsNode Method

Definition

Overloads

GetJsonSchemaAsNode(JsonTypeInfo, JsonSchemaExporterOptions)

Gets the JSON schema for typeInfo as a JsonNode document.

GetJsonSchemaAsNode(JsonSerializerOptions, Type, JsonSchemaExporterOptions)

Gets the JSON schema for type as a JsonNode document.

GetJsonSchemaAsNode(JsonTypeInfo, JsonSchemaExporterOptions)

Gets the JSON schema for typeInfo as a JsonNode document.

public static System.Text.Json.Nodes.JsonNode GetJsonSchemaAsNode (this System.Text.Json.Serialization.Metadata.JsonTypeInfo typeInfo, System.Text.Json.Schema.JsonSchemaExporterOptions? exporterOptions = default);
static member GetJsonSchemaAsNode : System.Text.Json.Serialization.Metadata.JsonTypeInfo * System.Text.Json.Schema.JsonSchemaExporterOptions -> System.Text.Json.Nodes.JsonNode
<Extension()>
Public Function GetJsonSchemaAsNode (typeInfo As JsonTypeInfo, Optional exporterOptions As JsonSchemaExporterOptions = Nothing) As JsonNode

Parameters

typeInfo
JsonTypeInfo

The contract from which to resolve the JSON schema.

exporterOptions
JsonSchemaExporterOptions

The options object governing the export operation.

Returns

A JSON object containing the schema for typeInfo.

Applies to

GetJsonSchemaAsNode(JsonSerializerOptions, Type, JsonSchemaExporterOptions)

Gets the JSON schema for type as a JsonNode document.

public static System.Text.Json.Nodes.JsonNode GetJsonSchemaAsNode (this System.Text.Json.JsonSerializerOptions options, Type type, System.Text.Json.Schema.JsonSchemaExporterOptions? exporterOptions = default);
static member GetJsonSchemaAsNode : System.Text.Json.JsonSerializerOptions * Type * System.Text.Json.Schema.JsonSchemaExporterOptions -> System.Text.Json.Nodes.JsonNode
<Extension()>
Public Function GetJsonSchemaAsNode (options As JsonSerializerOptions, type As Type, Optional exporterOptions As JsonSchemaExporterOptions = Nothing) As JsonNode

Parameters

options
JsonSerializerOptions

The options declaring the contract for the type.

type
Type

The type for which to resolve a schema.

exporterOptions
JsonSchemaExporterOptions

The options object governing the export operation.

Returns

A JSON object containing the schema for type.

Applies to