JsonNode.GetValue<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the value for the current JsonValue.
public:
generic <typename T>
virtual T GetValue();
public virtual T GetValue<T> ();
abstract member GetValue : unit -> 'T
override this.GetValue : unit -> 'T
Public Overridable Function GetValue(Of T) () As T
Type Parameters
- T
The type of the value to obtain from the JsonValue.
Returns
A value converted from the JsonValue instance.
Exceptions
The current JsonNode cannot be represented as a {TValue}.
Remarks
{T} can be the type or base type of the underlying value. If the underlying value is a JsonElement then {T} can also be the type of any primitive value supported by current JsonElement.
Specifying the Object type for {T} will always succeed and return the underlying value as Object.
The underlying value of a JsonValue after deserialization is an instance of JsonElement,otherwise it's the value specified when the JsonValue was created.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기