JsonNode.Parse メソッド

定義

オーバーロード

Parse(String, Nullable<JsonNodeOptions>, JsonDocumentOptions)

1 つの JSON 値を表すテキストを解析します。

Parse(ReadOnlySpan<Byte>, Nullable<JsonNodeOptions>, JsonDocumentOptions)

1 つの JSON 値を表すテキストを解析します。

Parse(Utf8JsonReader, Nullable<JsonNodeOptions>)

指定されたリーダーからの 1 つの JSON 値 (オブジェクトまたは配列を含む) を解析します。

Parse(Stream, Nullable<JsonNodeOptions>, JsonDocumentOptions)

1 つの JSON 値を Stream 表す UTF-8 でエンコードされたデータとして を に解析します JsonNode。 Streamは完了まで読み取られます。

Parse(String, Nullable<JsonNodeOptions>, JsonDocumentOptions)

ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs

1 つの JSON 値を表すテキストを解析します。

public static System.Text.Json.Nodes.JsonNode? Parse (string json, System.Text.Json.Nodes.JsonNodeOptions? nodeOptions = default, System.Text.Json.JsonDocumentOptions documentOptions = default);
static member Parse : string * Nullable<System.Text.Json.Nodes.JsonNodeOptions> * System.Text.Json.JsonDocumentOptions -> System.Text.Json.Nodes.JsonNode
Public Shared Function Parse (json As String, Optional nodeOptions As Nullable(Of JsonNodeOptions) = Nothing, Optional documentOptions As JsonDocumentOptions = Nothing) As JsonNode

パラメーター

json
String

解析する JSON テキスト。

nodeOptions
Nullable<JsonNodeOptions>

解析後にノードの動作を制御するオプション。

documentOptions
JsonDocumentOptions

解析中のドキュメントの動作を制御するオプション。

戻り値

JsonNode JSON 値の表現。入力が null JSON 値を表す場合は null。

例外

jsonnull です。

json では、有効な単一の JSON 値が表現されていません。

適用対象

Parse(ReadOnlySpan<Byte>, Nullable<JsonNodeOptions>, JsonDocumentOptions)

ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs

1 つの JSON 値を表すテキストを解析します。

public static System.Text.Json.Nodes.JsonNode? Parse (ReadOnlySpan<byte> utf8Json, System.Text.Json.Nodes.JsonNodeOptions? nodeOptions = default, System.Text.Json.JsonDocumentOptions documentOptions = default);
static member Parse : ReadOnlySpan<byte> * Nullable<System.Text.Json.Nodes.JsonNodeOptions> * System.Text.Json.JsonDocumentOptions -> System.Text.Json.Nodes.JsonNode
Public Shared Function Parse (utf8Json As ReadOnlySpan(Of Byte), Optional nodeOptions As Nullable(Of JsonNodeOptions) = Nothing, Optional documentOptions As JsonDocumentOptions = Nothing) As JsonNode

パラメーター

utf8Json
ReadOnlySpan<Byte>

解析する JSON テキスト。

nodeOptions
Nullable<JsonNodeOptions>

解析後にノードの動作を制御するオプション。

documentOptions
JsonDocumentOptions

解析中のドキュメントの動作を制御するオプション。

戻り値

JsonNode JSON 値の表現。入力が null JSON 値を表す場合は null。

例外

utf8Json では、有効な単一の JSON 値が表現されていません。

適用対象

Parse(Utf8JsonReader, Nullable<JsonNodeOptions>)

ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs

指定されたリーダーからの 1 つの JSON 値 (オブジェクトまたは配列を含む) を解析します。

public static System.Text.Json.Nodes.JsonNode? Parse (ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.Nodes.JsonNodeOptions? nodeOptions = default);
static member Parse : Utf8JsonReader * Nullable<System.Text.Json.Nodes.JsonNodeOptions> -> System.Text.Json.Nodes.JsonNode
Public Shared Function Parse (ByRef reader As Utf8JsonReader, Optional nodeOptions As Nullable(Of JsonNodeOptions) = Nothing) As JsonNode

パラメーター

reader
Utf8JsonReader

読み取りを行うリーダー。

nodeOptions
Nullable<JsonNodeOptions>

動作を制御するオプション。

戻り値

JsonNodeリーダーからの 。入力が null JSON 値を表す場合は null。

例外

reader で、サポートされていないオプションが使用されています。

現在の reader トークンは値を開始または表現していません。

リーダーから値を読み取ることができませんでした。

注釈

の プロパティが TokenTypePropertyName または Nonereader場合、リーダーは を 1 回呼び出Read()して値の開始を決定します。

このメソッドが完了すると、 reader は JSON 値の最後のトークンに配置されます。 例外がスローされた場合、リーダーはメソッドが呼び出されたときの状態にリセットされます。

このメソッドは、リーダーが処理したデータのコピーを作成するため、このメソッドの戻り値を超えてデータの整合性を維持するための呼び出し元の要件はありません。

適用対象

Parse(Stream, Nullable<JsonNodeOptions>, JsonDocumentOptions)

ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs
ソース:
JsonNode.Parse.cs

1 つの JSON 値を Stream 表す UTF-8 でエンコードされたデータとして を に解析します JsonNode。 Streamは完了まで読み取られます。

public static System.Text.Json.Nodes.JsonNode? Parse (System.IO.Stream utf8Json, System.Text.Json.Nodes.JsonNodeOptions? nodeOptions = default, System.Text.Json.JsonDocumentOptions documentOptions = default);
static member Parse : System.IO.Stream * Nullable<System.Text.Json.Nodes.JsonNodeOptions> * System.Text.Json.JsonDocumentOptions -> System.Text.Json.Nodes.JsonNode
Public Shared Function Parse (utf8Json As Stream, Optional nodeOptions As Nullable(Of JsonNodeOptions) = Nothing, Optional documentOptions As JsonDocumentOptions = Nothing) As JsonNode

パラメーター

utf8Json
Stream

解析する JSON テキスト。

nodeOptions
Nullable<JsonNodeOptions>

解析後にノードの動作を制御するオプション。

documentOptions
JsonDocumentOptions

解析中のドキュメントの動作を制御するオプション。

戻り値

JsonNode JSON 値の表現。入力が null JSON 値を表す場合は null。

例外

utf8Json では、有効な単一の JSON 値が表現されていません。

適用対象