I have a very simple datatable which I serialize into JSON using Newtonsoft
DataTable dt = DBHelper.GetDataTable(value.Sql);
string json = JsonConvert.SerializeObject(dt, Formatting.None);
return json;
This is the result
"[{\"IdUsuario\":\"37\",\"IdEmpresa\":\"3\",\"Usuario\":\"koala\",\"NombreUsuario\":\"\",\"IdTercero\":\"715\",\"nit\":\"71790599\",\"Bloqueado\":\"0\",\"Descripcion\":\"\",\"IdDependencia\":\"\",\"IdBodega\":\"5\"}]"
I don´t know why i have extra "\" inside the field names, this only happens in this project (WebApi). If i do the same thing from a windows forms test application i have "normal" json.