I want to deserialize a JSON string that has double quoted string as mentioned below.
Json:
string jsonString = "{\"Name\": 2, \"Description\": \"The \"test\" description\"}";
Target Class:
public class TestClass
{
public string Name { get; set; }
public string Description { get; set; }
}
Deserialization Code:
string jsonString = "{\"Name\": 2, \"Description\": \"The \"test\" description\"}";
var jData = JsonConvert.DeserializeObject<TestClass>(jsonString);
I am not able to escape the double quotes and having the following error.