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

管理匯出作業的選項物件。

傳回

JSON 物件,包含 typeInfo的架構。

適用於

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

管理匯出作業的選項物件。

傳回

JSON 物件,包含 type的架構。

適用於