Skip to content

Allow to modify the JsonSerializerOptions #41

@ydang204

Description

@ydang204

Could we provide a way to change the default json options of JsonSerializer?

public static async Task<T> GetAndDeserializeAsync<T>(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<T>(text, Constants.DefaultJsonOptions);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions