Json.Decode Method (String)
Converts data in JavaScript Object Notation (JSON) format into a data object.
Namespace: System.Web.Helpers
Assembly: System.Web.Helpers (in System.Web.Helpers.dll)
Syntax
'Declaration
Public Shared Function Decode ( _
value As String _
) As Object
'Usage
Dim value As String
Dim returnValue As Object
returnValue = Json.Decode(value)
public static Object Decode(
string value
)
public:
static Object^ Decode(
String^ value
)
static member Decode :
value:string -> Object
public static function Decode(
value : String
) : Object
Parameters
- value
Type: System.String
The JSON-encoded string to convert.
Return Value
Type: System.Object
The JSON-encoded data converted to a data object.
Remarks
Call the Decode method to decode data that was encoded into JSON format earlier by using the Encode(Object) method. You can use this method to convert JSON-encoded data into a data object that you can work with in ASP.NET Razor code. For example, you can use a foreach block to loop through all of the Product objects in a set of data and update them in a database.