Can't form valid JSON string

I’m having an issue with escaped double quotes being transmitted via http.

I’m manually building a JSON object and sending it to our JSON http server. The transmit occurs without error. The problem is that the server receives the string with the escape characters.
Here’s what the server receives, the escape characters make it invalid JSON:

[{“TS”:1357579371211,“version”:“Gadgeteer application version: 2.0.0”}]

Any idea on how to fix this?

string examplecontent = @ "[{""TS"":1357579371211,""version"":""Gadgeteer application version: 2.0.0""}]";
string Url = "ec2-50-112-197-66.us-west-2.compute.amazonaws.com";
string Path = "/mongo/json.php";
Path += "?" + examplecontent;
T2_HTTP_Client httpClient = new T2_HTTP_Client(new WiFlySocket(Url, 80, wifiBoard));
T2_HTTP_Client.HTTP_Response Response = httpClient.Post(Path);

@ scoleman2272 - I have not done much in the lines of JSON, but through a quick reading of the standard construction of JSON strings, I think that your string should look like this (manually escaped)


string examplecontent = "[{\"TS\":1357579371211,\"version\":\"Gadgeteer application version: 2.0.0\"}]";

Is there a reason you were using two sets of double quotes for each string encapsulation?

verbatim strings (which start with the @ ) use “”"" to escape quotes a character while regular strings use ". So my verbatim string is equivalent to your manually escaped string.

Maybe you should use some URLEncode function. You can find URLDecode on codeshare NET/HttpHelper.cs (http://www.tinyclr.com/codeshare/entry/186)
But why not post JSon object in stream, not in URL?