Json.Decode Method (String, Type)

Converts data in JavaScript Object Notation (JSON) format into a data object of a specified type.

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

Syntax

'Declaration
Public Shared Function Decode ( _
    value As String, _
    targetType As Type _
) As Object
'Usage
Dim value As String 
Dim targetType As Type 
Dim returnValue As Object 

returnValue = Json.Decode(value, _
    targetType)
public static Object Decode(
    string value,
    Type targetType
)
public:
static Object^ Decode(
    String^ value, 
    Type^ targetType
)
static member Decode : 
        value:string * 
        targetType:Type -> Object
public static function Decode(
    value : String, 
    targetType : Type
) : Object

Parameters

  • targetType
    Type: System.Type
    The type that the value data should be converted to.

Return Value

Type: System.Object
The JSON-encoded data converted to the specified type.

See Also

Reference

Json Class

Decode Overload

System.Web.Helpers Namespace