Visual Studio C#からasmxWebサービスを利用しています。サンプルコード
WebRequest request = WebRequest.Create(WholeURL);
request.ContentType = "application/json; charset=utf-8";
request.Method = "POST";
request.ContentLength = postData.Length;
using (StreamWriter requester = new StreamWriter(request.GetRequestStream()))
{
requester.Write(postData);
requester.Close();
}
//Get the response
WebResponse response = request.GetResponse();
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.ok
string responseFromServer = reader.ReadToEnd();
json応答からdを削除するにはどうすればよいですか?
私のjson応答は:{"d":-1}必要なのは-1だけです。
ありがとう