JsonNode.Parse メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| 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 値を表す UTF-8 でエンコードされたデータとして Stream を JsonNodeに解析します。 Stream は読み取って完了します。 |
Parse(String, Nullable<JsonNodeOptions>, JsonDocumentOptions)
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
解析中のドキュメントの動作を制御するオプション。
返品
JSON 値の JsonNode 表現。入力が null JSON 値を表す場合は null。
例外
json は nullです。
json は有効な単一の JSON 値を表していません。
適用対象
Parse(ReadOnlySpan<Byte>, Nullable<JsonNodeOptions>, JsonDocumentOptions)
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
解析中のドキュメントの動作を制御するオプション。
返品
JSON 値の JsonNode 表現。入力が null JSON 値を表す場合は null。
例外
utf8Json は有効な単一の JSON 値を表していません。
適用対象
Parse(Utf8JsonReader, Nullable<JsonNodeOptions>)
指定されたリーダーから 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 トークンは、値を開始または表していません。
値をリーダーから読み取れませんでした。
注釈
readerのTokenType プロパティがPropertyNameまたはNoneの場合、リーダーは 1 回の呼び出しで値の開始を決定するためにRead()されます。
このメソッドが完了すると、 reader は JSON 値の最後のトークンに配置されます。 例外がスローされた場合、リーダーはメソッドが呼び出されたときの状態にリセットされます。
このメソッドは、リーダーが操作したデータのコピーを作成するため、このメソッドの戻り値を超えてデータの整合性を維持する呼び出し元の要件はありません。
適用対象
Parse(Stream, Nullable<JsonNodeOptions>, JsonDocumentOptions)
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
解析中のドキュメントの動作を制御するオプション。
返品
JSON 値の JsonNode 表現。入力が null JSON 値を表す場合は null。
例外
utf8Json は有効な単一の JSON 値を表していません。