JsonValueExtensions.ReadAsType<T> Method (JsonValue, T)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Reads the JsonValueExtensions as an object with specified fallback.
Namespace: System.Runtime.Serialization.Json
Assembly: System.Json (in System.Json.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ReadAsType(Of T) ( _
jsonValue As JsonValue, _
fallback As T _
) As T
public static T ReadAsType<T>(
this JsonValue jsonValue,
T fallback
)
[ExtensionAttribute]
public:
generic<typename T>
static T ReadAsType(
JsonValue^ jsonValue,
T fallback
)
static member ReadAsType :
jsonValue:JsonValue *
fallback:'T -> 'T
JScript does not support generic types or methods.
Type Parameters
- T
The generic type.
Parameters
- jsonValue
Type: System.Json.JsonValue
The Json value.
- fallback
Type: T
The fallback.
Return Value
Type: T
The read JsonValueExtensions.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type JsonValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.