JsonSchemaExporter.GetJsonSchemaAsNode 方法

定义

重载

GetJsonSchemaAsNode(JsonTypeInfo, JsonSchemaExporterOptions)

获取 typeInfo 作为 JsonNode 文档的 JSON 架构。

GetJsonSchemaAsNode(JsonSerializerOptions, Type, JsonSchemaExporterOptions)

获取 type 作为 JsonNode 文档的 JSON 架构。

GetJsonSchemaAsNode(JsonTypeInfo, JsonSchemaExporterOptions)

获取 typeInfo 作为 JsonNode 文档的 JSON 架构。

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

参数

typeInfo
JsonTypeInfo

要从中解析 JSON 架构的协定。

exporterOptions
JsonSchemaExporterOptions

用于控制导出操作的选项对象。

返回

包含 typeInfo架构的 JSON 对象。

适用于

GetJsonSchemaAsNode(JsonSerializerOptions, Type, JsonSchemaExporterOptions)

获取 type 作为 JsonNode 文档的 JSON 架构。

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

参数

options
JsonSerializerOptions

声明类型协定的选项。

type
Type

要为其解析架构的类型。

exporterOptions
JsonSchemaExporterOptions

用于控制导出操作的选项对象。

返回

包含 type架构的 JSON 对象。

适用于