Parsing a string in vb.net



Generally i parse a XML String as followed :


The XML String i recieve



<Status>string</Status>
<RedirectURL>string</RedirectURL>


The way i parse it



Dim sReason As String = "Unknown"

Try
xml.LoadXml(sResult)
If xml.SelectSimpleNode("Status").InnerText = "PURCHASED" Then
app.Outcome.RedirectURL = xml.SelectSimpleNode("RedirectUrl").InnerText
AcceptLead()
Return True
End If


Now i need to parse a string that is not delivered in XML , but is delivered to me as followed



{"RedirectUrl":"www.test.com","Commission":5.0000,"Status":"accepted"}


How do i do this ?


No comments:

Post a Comment