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

Refit.IJsonTypeInfoContentSerializer

An optional capability for an IHttpContentSerializer that reads and writes JSON with metadata the caller supplies for each call, such as a property of a source-generated context, instead of looking the metadata up.
T DeserializeFromString<T>(string content, JsonTypeInfo<T> typeInfo)

Reads buffered JSON text with explicit type metadata.

IAsyncEnumerable<T> DeserializeStreamAsync<T>(Stream stream, StreamingContentFormat format, JsonTypeInfo<T> typeInfo, CancellationToken cancellationToken = default)

Reads one value at a time from a framed response stream with explicit type metadata.

Task<T> FromHttpContentAsync<T>(HttpContent content, JsonTypeInfo<T> typeInfo, CancellationToken cancellationToken = default)

Reads a value from HttpContent with explicit type metadata.

HttpContent ToHttpContent<T>(T item, JsonTypeInfo<T> typeInfo)

Serializes a value to HttpContent with explicit type metadata.

Serializes a value into a buffered body with explicit type metadata.

Creates a body that serializes a value with explicit type metadata when the request sends it.