<PackageReference Include="System.ClientModel" Version="1.9.0" />

System.ClientModel.Primitives.JsonModel<T>

public abstract class JsonModel<T> : IJsonModel<T>, IPersistableModel<T>
Helper class for JSON models implementing IJsonModel<T>.
protected JsonModel()

public T Create(BinaryData data, ModelReaderWriterOptions options = null)

Converts the provided BinaryData into a model.

protected abstract T CreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

protected abstract void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)

Writes the model to the provided Utf8JsonWriter.