C#将url上的json对象发送给php

时间:2018-04-13 16:36:20

标签: c# json

我遇到了问题:我想在网址上发送一个json对象。

我使用newtonsoft.com将数据集转换为json,但是当我执行代码时,它会在文件json的每个onlet部分打开几个

String xmlString = DataTableToJSONWithJSONNet(myDataSet2).ToString(); 
System.Diagnostics.Process.Start(@"http://127.0.0.1/test/page1.php?appid=" + xmlString);

public string DataTableToJSONWithJSONNet(DataSet table)
{
    string JSONString = string.Empty;
    JSONString = JsonConvert.SerializeObject(table);
    return JSONString;
}   

0 个答案:

没有答案