Table of Contents

Class PathJsonConverter

Namespace
Olve.MinimalApi
Assembly
Olve.MinimalApi.dll

Converts IPath instances to and from JSON string representations.

public sealed class PathJsonConverter : JsonConverter<IPath>
Inheritance
PathJsonConverter
Inherited Members

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads an IPath value from JSON.

public override IPath? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader

JSON reader to read from.

typeToConvert Type

The target type to convert.

options JsonSerializerOptions

Serializer options.

Returns

IPath

The deserialized IPath or null if JSON is null.

Write(Utf8JsonWriter, IPath, JsonSerializerOptions)

Writes an IPath value as a JSON string.

public override void Write(Utf8JsonWriter writer, IPath value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

JSON writer to write to.

value IPath

The IPath value to serialize.

options JsonSerializerOptions

Serializer options.