Deserialize
You can use this function to convert the JSON format into object.
Syntax
Dim myClassObj As myClass
myClassObj = Deserialize(Of myClass)(dataString)
Arguments
Part | Description |
---|---|
myClass | The type of the class. |
dataString | The string value that has to be converted into object. |
Description
Deserialize function converts the specified JSON string into object.
Example
This is an example to deserialize a JSON string into object.
A JSON string variable is created with the data string.
Dim jsonString = "[""Project Code"",""Description"",""Customer Name"",""Total Cost""]"
Using the deserialize function, the JSON string is stored as object.
Dim valueArray As String()
valueArray = Deserialize(Of String())(dataString)
Dim myClassObj As myClass
myClassObj = Deserialize(Of myClass)(dataString)