JsonElement.TryGetProperty 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| Name | Description |
|---|---|
| TryGetProperty(String, JsonElement) |
현재 개체에서 명명된 |
| TryGetProperty(ReadOnlySpan<Byte>, JsonElement) |
현재 개체에서 명명된 |
| TryGetProperty(ReadOnlySpan<Char>, JsonElement) |
현재 개체에서 명명된 |
TryGetProperty(String, JsonElement)
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
현재 개체에서 명명된 propertyName 속성을 찾은 다음 해당 속성이 있는지 여부를 나타내는 값을 반환합니다. 속성이 있으면 해당 값이 인수에 value 할당됩니다.
public:
bool TryGetProperty(System::String ^ propertyName, [Runtime::InteropServices::Out] System::Text::Json::JsonElement % value);
public bool TryGetProperty(string propertyName, out System.Text.Json.JsonElement value);
member this.TryGetProperty : string * JsonElement -> bool
Public Function TryGetProperty (propertyName As String, ByRef value As JsonElement) As Boolean
매개 변수
- propertyName
- String
찾을 속성의 이름입니다.
- value
- JsonElement
이 메서드가 반환될 때 지정된 속성의 값을 포함합니다.
반품
true속성을 찾았으면 다음을 실행합니다. 그렇지 않으면 . false
예외
propertyName은 null입니다.
부모가 JsonDocument 삭제되었습니다.
설명
속성 이름 일치는 대/소문자를 구분하는 서수 비교로 수행됩니다.
속성이 동일한 개체에 대해 여러 번 정의된 경우 메서드는 마지막 정의와 일치합니다.
추가 정보
적용 대상
TryGetProperty(ReadOnlySpan<Byte>, JsonElement)
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
현재 개체에서 명명된 utf8PropertyName 속성을 찾은 다음 해당 속성이 있는지 여부를 나타내는 값을 반환합니다. 속성이 있으면 메서드는 인수에 value 해당 값을 할당합니다.
public:
bool TryGetProperty(ReadOnlySpan<System::Byte> utf8PropertyName, [Runtime::InteropServices::Out] System::Text::Json::JsonElement % value);
public bool TryGetProperty(ReadOnlySpan<byte> utf8PropertyName, out System.Text.Json.JsonElement value);
member this.TryGetProperty : ReadOnlySpan<byte> * JsonElement -> bool
Public Function TryGetProperty (utf8PropertyName As ReadOnlySpan(Of Byte), ByRef value As JsonElement) As Boolean
매개 변수
- utf8PropertyName
- ReadOnlySpan<Byte>
반환할 속성 이름의 UTF-8(BOM(Byte-Order-Mark 없음) 표현입니다.
- value
- JsonElement
찾은 속성의 값을 받습니다.
반품
true속성을 찾았으면 다음을 실행합니다. 그렇지 않으면 . false
예외
부모가 JsonDocument 삭제되었습니다.
설명
속성 이름 일치는 대/소문자를 구분하는 서수 비교로 수행됩니다.
속성이 동일한 개체에 대해 여러 번 정의된 경우 메서드는 마지막 정의와 일치합니다.
자세한 내용은 System.Text.Json을 사용하여 사용자 지정 serializer 및 역직렬 변환기를 작성하는 방법을 참조하세요.
추가 정보
적용 대상
TryGetProperty(ReadOnlySpan<Char>, JsonElement)
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
- Source:
- JsonElement.cs
현재 개체에서 명명된 propertyName 속성을 찾은 다음 해당 속성이 있는지 여부를 나타내는 값을 반환합니다. 속성이 있으면 메서드는 인수에 value 해당 값을 할당합니다.
public:
bool TryGetProperty(ReadOnlySpan<char> propertyName, [Runtime::InteropServices::Out] System::Text::Json::JsonElement % value);
public bool TryGetProperty(ReadOnlySpan<char> propertyName, out System.Text.Json.JsonElement value);
member this.TryGetProperty : ReadOnlySpan<char> * JsonElement -> bool
Public Function TryGetProperty (propertyName As ReadOnlySpan(Of Char), ByRef value As JsonElement) As Boolean
매개 변수
- propertyName
- ReadOnlySpan<Char>
찾을 속성의 이름입니다.
- value
- JsonElement
이 메서드가 반환될 때 지정된 속성의 값을 포함합니다.
반품
true속성을 찾았으면 다음을 실행합니다. 그렇지 않으면 . false
예외
부모가 JsonDocument 삭제되었습니다.
설명
속성 이름 일치는 대/소문자를 구분하는 서수 비교로 수행됩니다.
속성이 동일한 개체에 대해 여러 번 정의된 경우 메서드는 마지막 정의와 일치합니다.