<PackageReference Include="System.Runtime.Serialization.Formatters" Version="11.0.0-preview.5.26302.115" />

System.Runtime.Serialization.IFormatter

public interface IFormatter
Provides functionality for formatting serialized objects.

Gets or sets the SerializationBinder that performs type lookups during deserialization.

StreamingContext Context { get; set; }

Gets or sets the StreamingContext used for serialization and deserialization.

Gets or sets the SurrogateSelector used by the current formatter.

object Deserialize(Stream serializationStream)

Deserializes the data on the provided stream and reconstitutes the graph of objects.

void Serialize(Stream serializationStream, object graph)

Serializes an object, or graph of objects with the given root to the provided stream.