using Newtonsoft.Json;
JsonConvert.SerializeObject(response);
but getting in postman response like extra qoutes and escape sequence in string so that can not be parse in json again
"{\"Data\":null,\"Message\":null,\"Status\":0}"
using Newtonsoft.Json;
JsonConvert.SerializeObject(response);
but getting in postman response like extra qoutes and escape sequence in string so that can not be parse in json again
"{\"Data\":null,\"Message\":null,\"Status\":0}"
If you are in a controller and using SerializeObject(response) it will return a string object, so it's normal you get the extra quote at the start/end of your JSON.
If you are in a ASP.NET controller you should juste return the response directly like this :
return response
And the framework will take care of serializing it into JSON (or even another format if needed). It's not a concern you should take care of.