Table of Contents

Class JsonLDContextConverter

Namespace
ActivityPub.Types.Conversion.Converters
Assembly
ActivityPub.Types.dll

Custom JSON converter for the JSON-LD

@context
property.
public class JsonLDContextConverter : JsonConverter<JsonLDContext>
Inheritance
JsonLDContextConverter
Inherited Members

Remarks

We need THREE FUCKING CONVERTERS for a minimum-viable implementation!

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type JsonLDContext.

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

Parameters

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An object that specifies serialization options to use.

Returns

JsonLDContext

The converted value.

ReadContext(ref Utf8JsonReader, JsonSerializerOptions)

private static JsonLDContextObject ReadContext(ref Utf8JsonReader reader, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader
options JsonSerializerOptions

Returns

JsonLDContextObject

ReadContextArray(ref Utf8JsonReader, JsonSerializerOptions)

private static JsonLDContext ReadContextArray(ref Utf8JsonReader reader, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader
options JsonSerializerOptions

Returns

JsonLDContext

Write(Utf8JsonWriter, JsonLDContext, JsonSerializerOptions)

Writes a specified value as JSON.

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

Parameters

writer Utf8JsonWriter

The writer to write to.

value JsonLDContext

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.

See Also