Is there is any other way deserialize JSON string,rather than using the Newtonsoft library? I've a string like
string json = "{status : '1',message : '<tr><th>Date</th><th>Description</th><th>Reference</th> <th>Code</th><th>Dept Code</th><th>Debit</th><th>Credit</th></tr>'}";
if i want to access the message property in code behind file, how can i do that?
Consider this:
You need this required namespaces:
Consider this class:
SerializableAttribute
is required to work withJavaScriptSerializer
USAGE
You may also deserialize with
JavaScriptSerializer
in aDictionary
. See this:Create class
Than use this in your code
You could use the
DataContractJsonSerializer
. Deserialize it as a class with what you want to extract, e.g.