Home IWeaklyTypedJsonConverter Interface
IWeaklyTypedJsonConverter Interface
Cancel

IWeaklyTypedJsonConverter Interface

Namespace: Json.More

Inheritance: IWeaklyTypedJsonConverter

Interface to enable JsonConverter implementations to call other JsonConverter’s Read methods without statically being aware of their type parameters.

Methods

Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Reads and converts the JSON to object?.

Declaration

1
public abstract object Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
ParameterTypeDescription
readerref Utf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.

Returns

The converted value.

Write(Utf8JsonWriter writer, object value, JsonSerializerOptions options, JsonTypeInfo typeInfo)

Writes a specified value as JSON.

Declaration

1
public abstract void Write(Utf8JsonWriter writer, object value, JsonSerializerOptions options, JsonTypeInfo typeInfo)
ParameterTypeDescription
writerUtf8JsonWriterThe writer to write to.
valueobjectThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
typeInfoJsonTypeInfoThe System.Text.Json.Serialization.Metadata.JsonTypeInfo for the value being serialized.
Contents