JsonElement 構造体
定義
JsonDocument 内の特定の JSON 値を表します。Represents a specific JSON value within a JsonDocument.
public value class JsonElement
public struct JsonElement
type JsonElement = struct
Public Structure JsonElement
- 継承
注釈
詳細については、「 JSON をシリアル化および逆シリアル化する方法」を参照してください。For more information, see How to serialize and deserialize JSON.
プロパティ
Item[Int32] |
現在の値が Array の場合、指定されたインデックスの値を取得します。Gets the value at the specified index if the current value is an Array. |
ValueKind |
現在の JSON 値の型を取得します。Gets the type of the current JSON value. |
メソッド
Clone() |
元の JsonDocument の有効期間を超えて安全に格納できる JsonElement を取得します。Gets a JsonElement that can be safely stored beyond the lifetime of the original JsonDocument. |
EnumerateArray() |
この JsonElement によって表される JSON 配列内の値を列挙する列挙子を取得します。Gets an enumerator to enumerate the values in the JSON array represented by this JsonElement. |
EnumerateObject() |
この JsonElement によって表される JSON オブジェクト内のプロパティを列挙する列挙子を取得します。Gets an enumerator to enumerate the properties in the JSON object represented by this JsonElement. |
GetArrayLength() |
現在の配列値に含まれる値の数を取得します。Gets the number of values contained within the current array value. |
GetBoolean() |
要素の値を Boolean として取得します。Gets the value of the element as a Boolean. |
GetByte() |
現在の JSON 数値を Byte として取得します。Gets the current JSON number as a Byte. |
GetBytesFromBase64() |
バイト配列として要素の値を取得します。Gets the value of the element as a byte array. |
GetDateTime() |
要素の値を DateTime として取得します。Gets the value of the element as a DateTime. |
GetDateTimeOffset() |
要素の値を DateTimeOffset として取得します。Gets the value of the element as a DateTimeOffset. |
GetDecimal() |
現在の JSON 数値を Decimal として取得します。Gets the current JSON number as a Decimal. |
GetDouble() |
現在の JSON 数値を Double として取得します。Gets the current JSON number as a Double. |
GetGuid() |
要素の値を Guid として取得します。Gets the value of the element as a Guid. |
GetInt16() |
現在の JSON 数値を Int16 として取得します。Gets the current JSON number as an Int16. |
GetInt32() |
現在の JSON 数値を Int32 として取得します。Gets the current JSON number as an Int32. |
GetInt64() |
現在の JSON 数値を Int64 として取得します。Gets the current JSON number as an Int64. |
GetProperty(ReadOnlySpan<Byte>) |
|
GetProperty(ReadOnlySpan<Char>) |
|
GetProperty(String) |
|
GetRawText() |
この値を裏付ける元の入力データを表す文字列を取得します。Gets a string that represents the original input data backing this value. |
GetSByte() |
現在の JSON 数値を SByte として取得します。Gets the current JSON number as an SByte. |
GetSingle() |
現在の JSON 数値を Single として取得します。Gets the current JSON number as a Single. |
GetString() |
要素の値を String として取得します。Gets the value of the element as a String. |
GetUInt16() |
現在の JSON 数値を UInt16 として取得します。Gets the current JSON number as a UInt16. |
GetUInt32() |
現在の JSON 数値を UInt32 として取得します。Gets the current JSON number as a UInt32. |
GetUInt64() |
現在の JSON 数値を UInt64 として取得します。Gets the current JSON number as a UInt64. |
ToString() |
値の型に適した現在の値の文字列表現を取得します。Gets a string representation for the current value appropriate to the value type. |
TryGetByte(Byte) |
現在の JSON 数値を Byte として表現しようと試みます。Attempts to represent the current JSON number as a Byte. |
TryGetBytesFromBase64(Byte[]) |
Base64 でエンコードされていると想定として、現在の JSON 文字列をバイト配列として表現しようとします。Attempts to represent the current JSON string as a byte array, assuming that it is Base64 encoded. |
TryGetDateTime(DateTime) |
現在の JSON 文字列を DateTime として表現しようと試みます。Attempts to represent the current JSON string as a DateTime. |
TryGetDateTimeOffset(DateTimeOffset) |
現在の JSON 文字列を DateTimeOffset として表現しようと試みます。Attempts to represent the current JSON string as a DateTimeOffset. |
TryGetDecimal(Decimal) |
現在の JSON 数値を Decimal として表現しようと試みます。Attempts to represent the current JSON number as a Decimal. |
TryGetDouble(Double) |
現在の JSON 数値を Double として表現しようと試みます。Attempts to represent the current JSON number as a Double. |
TryGetGuid(Guid) |
現在の JSON 文字列を Guid として表現しようと試みます。Attempts to represent the current JSON string as a Guid. |
TryGetInt16(Int16) |
現在の JSON 数値を Int16 として表現しようと試みます。Attempts to represent the current JSON number as an Int16. |
TryGetInt32(Int32) |
現在の JSON 数値を Int32 として表現しようと試みます。Attempts to represent the current JSON number as an Int32. |
TryGetInt64(Int64) |
現在の JSON 数値を Int64 として表現しようと試みます。Attempts to represent the current JSON number as a Int64. |
TryGetProperty(ReadOnlySpan<Byte>, JsonElement) |
現在のオブジェクトで |
TryGetProperty(ReadOnlySpan<Char>, JsonElement) |
現在のオブジェクトで |
TryGetProperty(String, JsonElement) |
現在のオブジェクトで |
TryGetSByte(SByte) |
現在の JSON 数値を SByte として表現しようと試みます。Attempts to represent the current JSON number as an SByte. |
TryGetSingle(Single) |
現在の JSON 数値を Single として表現しようと試みます。Attempts to represent the current JSON number as a Single. |
TryGetUInt16(UInt16) |
現在の JSON 数値を UInt16 として表現しようと試みます。Attempts to represent the current JSON number as a UInt16. |
TryGetUInt32(UInt32) |
現在の JSON 数値を UInt32 として表現しようと試みます。Attempts to represent the current JSON number as a UInt32. |
TryGetUInt64(UInt64) |
現在の JSON 数値を UInt64 として表現しようと試みます。Attempts to represent the current JSON number as a UInt64. |
ValueEquals(ReadOnlySpan<Byte>) |
UTF-8 でエンコードされたバイト スパンによって表されるテキストを、この要素の文字列値と比較します。Compares the text represented by a UTF8-encoded byte span to the string value of this element. |
ValueEquals(ReadOnlySpan<Char>) |
指定された読み取り専用の文字スパンを、この要素の文字列値と比較します。Compares a specified read-only character span to the string value of this element. |
ValueEquals(String) |
指定された文字列を、この要素の文字列値と比較します。Compares a specified string to the string value of this element. |
WriteTo(Utf8JsonWriter) |
要素を指定されたライターに JSON 値として書き込みます。Writes the element to the specified writer as a JSON value. |