-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0] Update HttpClientJsonExtensions.Get.AsyncEnumerable.cs #92199
Conversation
reuse method from ReadFromJsonAsAsyncEnumerable
add httpClient null check
fix trailing space style
…lientJsonExtensionsTests.cs Co-authored-by: Eirik Tsarpalis <[email protected]>
Tagging subscribers to this area: @dotnet/ncl Issue DetailsBackport of #92180 to release/8.0 Customer ImpactTestingRiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
Hi @eiriktsarpalis , just to mention, this also fixes the bug when trying to use a custom serializer option sample code to reproduce using var httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost:5297");
var stream = httpClient.GetFromJsonAsAsyncEnumerable<Job>("api/Jobs",
new JsonSerializerOptions(JsonSerializerDefaults.Web)
); Exception likes below:
|
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsBackport of #92180 to release/8.0 Customer ImpactWe received a customer reported issue that one of the newly added IAsyncEnumerable methods in the System.Net.Http.Json library is not using the correct default settings when deserializing values. For instance, even though all other methods in the library use camelCase conversion, the impacted new methods do not. TestingAdded unit testing covering the impacted scenario. RiskLow. Makes a minor change in product code making it consistent with other components in the same library (including other IAsyncEnumerable methods added in the same change).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has my support for RC2, @artl93. It's a broken/imcomplete 8.0 scenario reported by a customer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
M2 approved.
Backport of #92180 to release/8.0
/cc @eiriktsarpalis @WeihanLi
Customer Impact
We received a customer reported issue that one of the newly added IAsyncEnumerable methods in the System.Net.Http.Json library is not using the correct default settings when deserializing values.
For instance, even though all other methods in the library use camelCase conversion, the impacted new methods do not.
Testing
Added unit testing covering the impacted scenario.
Risk
Low. Makes a minor change in product code making it consistent with other components in the same library (including other IAsyncEnumerable methods added in the same change).