{"action":"created","issue":{"url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/877","repository_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json","labels_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/877/labels{/name}","comments_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/877/comments","events_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/877/events","html_url":"https://github.com/JamesNK/Newtonsoft.Json/issues/877","id":147884893,"number":877,"title":"Extra Quotes Surrounding JSON Message","user":{"login":"RMittelman","id":2001118,"avatar_url":"https://avatars.githubusercontent.com/u/2001118?v=3","gravatar_id":"","url":"https://api.github.com/users/RMittelman","html_url":"https://github.com/RMittelman","followers_url":"https://api.github.com/users/RMittelman/followers","following_url":"https://api.github.com/users/RMittelman/following{/other_user}","gists_url":"https://api.github.com/users/RMittelman/gists{/gist_id}","starred_url":"https://api.github.com/users/RMittelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RMittelman/subscriptions","organizations_url":"https://api.github.com/users/RMittelman/orgs","repos_url":"https://api.github.com/users/RMittelman/repos","events_url":"https://api.github.com/users/RMittelman/events{/privacy}","received_events_url":"https://api.github.com/users/RMittelman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-12T21:52:01Z","updated_at":"2016-04-18T04:06:30Z","closed_at":"2016-04-18T04:06:30Z","body":"Trying to write C# component to do SQL lookup. Following code to test POC (using Nancy Self-Host):\r\n```\r\n            Get[\"/parms/{parm1}/{parm2}\"] = parameters =>\r\n                {\r\n\r\n                    string json;\r\n                    var uid = this.Request.Query[\"id\"];\r\n                    var pwd = this.Request.Query[\"pwd\"];\r\n\r\n                    if (pwd != \"Password\")\r\n                    {\r\n                        json = JsonConvert.SerializeObject(\"Password not recognized.\");\r\n                        return Response.AsJson(json);\r\n                    }\r\n                    else\r\n                    {\r\n\r\n                        using (var dt = new DataTable())\r\n                        {\r\n                            dt.Columns.Add(\"id\");\r\n                            dt.Columns.Add(\"password\");\r\n                            dt.Columns.Add(\"body\");\r\n                            dt.Rows.Add(uid, pwd, \"Some useful content\");\r\n                            dt.Rows.Add(uid, pwd, \"More useful content\");\r\n\r\n                            json = JsonConvert.SerializeObject(dt);\r\n                            return Response.AsJson(json);\r\n                        }\r\n                    }\r\n                 }\r\n\r\n```\r\nResponse is returning with extra quotes such as:\r\n\"\"Password not recognized\"\"\r\nIn the case where the password is recognized, the JSON comes back like this:\r\n\"[{\"id\":\"RMittelman\",\"password\":\"Password\",\"body\":\"Some useful content\"},{\"id\":\"RMittelman\",\"password\":\"Password\",\"body\":\"More useful content\"}]\"\r\n\r\nActually, besides the extra quotes at beginning and end, it came back with extra back-slashes like this:\r\n\"[{\\\"id\\\":\\\"RMittelman\\\",\\\"password\\\":\\\"Password\\\",\\\"body\\\":\\\"Some useful content\\\"},{\\\"id\\\":\\\"RMittelman\\\",\\\"password\\\":\\\"Password\\\",\\\"body\\\":\\\"More useful content\\\"}]\"\r\n\r\nI removed them in my client code.\r\n\r\nHere is how I call the web service:\r\n```\r\n        string GET(string url)\r\n        {\r\n            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);\r\n            try\r\n            {\r\n                WebResponse response = request.GetResponse();\r\n                using (Stream responseStream = response.GetResponseStream())\r\n                {\r\n                    StreamReader reader = new StreamReader(responseStream, Encoding.UTF8);\r\n                    string responseText = reader.ReadToEnd();\r\n                    return responseText;\r\n                }\r\n            }\r\n            catch (WebException ex)\r\n            {\r\n                WebResponse errorResponse = ex.Response;\r\n                if (errorResponse == null)\r\n                    return ex.Message;\r\n                using (Stream responseStream = errorResponse.GetResponseStream())\r\n                {\r\n                    StreamReader reader = new StreamReader(responseStream, Encoding.GetEncoding(\"utf-8\"));\r\n                    String errorText = reader.ReadToEnd();\r\n                    return errorText;\r\n                }\r\n                throw;\r\n            }\r\n        }\r\n```\r\nMust I also remove the leading and trailing quotes in my client code, or am I doing something else wrong?\r\n\r\nThanks..."},"comment":{"url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/comments/211190083","html_url":"https://github.com/JamesNK/Newtonsoft.Json/issues/877#issuecomment-211190083","issue_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/877","id":211190083,"user":{"login":"JamesNK","id":303201,"avatar_url":"https://avatars.githubusercontent.com/u/303201?v=3","gravatar_id":"","url":"https://api.github.com/users/JamesNK","html_url":"https://github.com/JamesNK","followers_url":"https://api.github.com/users/JamesNK/followers","following_url":"https://api.github.com/users/JamesNK/following{/other_user}","gists_url":"https://api.github.com/users/JamesNK/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesNK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesNK/subscriptions","organizations_url":"https://api.github.com/users/JamesNK/orgs","repos_url":"https://api.github.com/users/JamesNK/repos","events_url":"https://api.github.com/users/JamesNK/events{/privacy}","received_events_url":"https://api.github.com/users/JamesNK/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T04:06:30Z","updated_at":"2016-04-18T04:06:30Z","body":"You're double serializing."}}