web api 返回 去除双引号转义符

res = "{\"msg\":\"ok\",\"code\":200,\"data\":{\"url\":\"" + img + "\"}}";
return new HttpResponseMessage { Content = new StringContent(res, System.Text.Encoding.UTF8, "application/json") };

注意 必须用 HttpResponseMessage  类型是 JSON 否者还是带反斜杠输出

原文地址:https://www.cnblogs.com/linyijia/p/15735865.html