Class TypeJsonConverter

Namespace
Cratis.Json
Assembly
Cratis.Fundamentals.dll

Represents a JsonConverter<T> that can convert Type.

public class TypeJsonConverter : JsonConverter<Type>
Inheritance
TypeJsonConverter
Inherited Members
Extension Methods

Constructors

TypeJsonConverter()

public TypeJsonConverter()

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

[UnconditionalSuppressMessage("Trimming", "IL2057", Justification = "The type string in the JSON payload is expected to resolve to a type preserved by the application.")]
public override Type Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader
typeToConvert Type
options JsonSerializerOptions

Returns

Type

Write(Utf8JsonWriter, Type, JsonSerializerOptions)

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

Parameters

writer Utf8JsonWriter
value Type
options JsonSerializerOptions