<PackageReference Include="Refit" Version="16.3.0" />

Refit.SystemTextJsonContentSerializer

A class implementing IHttpContentSerializer using the System.Text.Json APIs.
namespace Refit { public sealed class SystemTextJsonContentSerializer : IHttpContentSerializer, IStreamingContentSerializer, ISynchronousContentSerializer, ISynchronousContentDeserializer { public JsonSerializerOptions SerializerOptions { get; } public SystemTextJsonContentSerializer(JsonSerializerOptions jsonSerializerOptions); public SystemTextJsonContentSerializer(); public static JsonSerializerOptions GetDefaultJsonSerializerOptions(); public static JsonSerializerOptions GetFastPathJsonSerializerOptions(); public HttpContent ToHttpContent<[System.Runtime.CompilerServices.Nullable(2)] T>(T item); public HttpContent ToHttpContentSynchronous<[System.Runtime.CompilerServices.Nullable(2)] T>(T item); public HttpContent ToStreamingHttpContent<[System.Runtime.CompilerServices.Nullable(2)] T>(T item); public Task<T> FromHttpContentAsync<[System.Runtime.CompilerServices.Nullable(2)] T>(HttpContent content, CancellationToken cancellationToken = default(CancellationToken)); public T DeserializeFromString<T>(string content); public IAsyncEnumerable<T> DeserializeStreamAsync<[System.Runtime.CompilerServices.Nullable(2)] T>(Stream stream, StreamingContentFormat format, CancellationToken cancellationToken = default(CancellationToken)); public string GetFieldNameForProperty(PropertyInfo propertyInfo); } }