Y is my object being serialized in a weird manner while using newtonsoft.json
from ASP.Net Web API?
var s = JsonConvert.SerializeObject(request, For
There's nothing to be worried about here. This is the correct serialized object json. It is appearing like this because you are viewing this in visual studio by hovering variable to view its value, because in c# \" is used to represent a " in a string. When you will write this value in a text file(just to test actual value) , you will see what is it's actual value as:
string json="{\"head\":{\"version\":\"1.0\",\"serial\":\"20140102,6,125\",\"skinId\":\"Test\"";
File.WriteAllText("c:\\tests on.txt",json) ;
You will see the json in file what you actually want.