You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. create JsonTextWriter in using block
2. encode a large json object
What is the expected output? What do you see instead?
content not flushed / malformed JSON
What version of the product are you using? On what operating system?
I checked the latest code checked in and I don't see a call to flush.
Original issue reported on code.google.com by [email protected] on 10 Jun 2011 at 1:26
The text was updated successfully, but these errors were encountered:
I can't currently, but I found another instance where this causes a problem
that you might be able to reproduce more easily:
HttpWebRequest request = WebRequest.Create(_uri_) as HttpWebRequest;
request.Method = "POST";
request.Headers.Add(HttpRequestHeader.ContentEncoding, "application/json;
charset=UTF8");
using ( JsonWriter writer = new JsonTextWriter(new StreamWriter(
request.GetRequestStream())))
{
JsonConvert.Export(RegistrationData_, writer);
}
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
This code will hang because the request stream is never closed/flushed
Original issue reported on code.google.com by
[email protected]
on 10 Jun 2011 at 1:26The text was updated successfully, but these errors were encountered: