<PackageReference Include="System.ClientModel" Version="1.1.0-beta.7" />

IJsonModel<T>

public interface IJsonModel<T> : IPersistableModel<T>
Allows an object to control its own JSON writing and reading.
using System.Runtime.CompilerServices; using System.Text.Json; namespace System.ClientModel.Primitives { [System.Runtime.CompilerServices.NullableContext(1)] public interface IJsonModel<[System.Runtime.CompilerServices.Nullable(2)] out T> : IPersistableModel<T> { void Write(Utf8JsonWriter writer, ModelReaderWriterOptions options); T Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options); } }