Web API JSON string result contains double quotes around value for dynamic object -
my controller follows...
public ihttpactionresult getdata() { ienumerable<dynamic> result = api.getdata(); string json = jsonconvert.serializeobject(result); return ok(json); }
returns raw text fiddler
{"@odata.context":"https://localhost:44305/api/$metadata#edm.string","value":"[\r\n {\r\n \"username\": \"test@gmail.com\"\r\n }\r\n]"
you notice json object value has double quotes around , special characters \r\n. how return pure json format???
i not getting more details code have tried way. there specific reason use serialized object?
[system.web.http.httpget] public ienumerable<xyz> getdata() { return api.getdata(); }
hope helps!!!