How do I deserialize following JSON string to an object?
{
"ArrayOfResults": {
"Results": [
{
"ErrorID": "0",
"ErrorMessage": null,
"MetroID": "281",
"MetroName": "050908 add metor no dffd"
},
{
"ErrorID": "0",
"ErrorMessage": null,
"MetroID": "284",
"MetroName": "050908 added with dff"
}
]
}
}
What you have shown is invalid JSON. You will need to fix your JSON in order to hope to handle it with a JSON serializer:
Once you have fixed it you can use the JavaScriptSerializer class to deserialize it to strongly typed model that you define: