If the json object is a string, in .Net the escape "\" characters are added,
should you want to clean up the json string, JObject.Parse({string}) as demonstrated
in the following code snippet cleans up nicely:
var myJsonAsString = "{\"Name\": \"John\", \"LastName\": \"Doe\", \"Age\": 199 }";
var myCleanJsonObject = JObject.Parse(myJsonAsString);
Should give us a clean Json object with the escape characters removed.
{
"Name": "John",
"LastName": "Doe",
"Age": 199
}
No comments:
Post a Comment