ardalis / ardalis/HttpClientTestExtensions
Allow to modify the JsonSerializerOptions
- Dominant language
- C#
- Stars
- 107
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Could we provide a way to change the default json options of JsonSerializer?
```
public static async Task GetAndDeserializeAsync(this HttpClient client, string requestUri, ITestOutputHelper output = null)
{
HttpResponseMessage obj = await client.GetAsync(requestUri, output);
obj.EnsureSuccessStatusCode();
string text = await obj.Content.ReadAsStringAsync();
output?.WriteLine("Response: " + text);
return JsonSerializer.Deserialize(text, Constants.DefaultJsonOptions);
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at GetAndDeserializeAsync and trace Constants.DefaultJsonOptions to understand where the default settings are applied. Determine how callers should provide or change JsonSerializerOptions, then verify that deserialization uses those options without breaking the existing default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100