Table of Contents

Class TypeMapConverter

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

Converts an object or value to or from JSON.

public class TypeMapConverter : JsonConverter<TypeMap>
Inheritance
TypeMapConverter
Inherited Members

Properties

NestedContextStack

Chain of contexts that inherit from each other. If a value is present, then it should be the parent of the current object's context.

private NestedContextStack NestedContextStack { get; }

Property Value

NestedContextStack

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type TypeMap.

public override TypeMap 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

TypeMap

The converted value.

ReadObject(JsonElement, JsonSerializerOptions)

private TypeMap ReadObject(JsonElement jsonElement, JsonSerializerOptions options)

Parameters

jsonElement JsonElement
options JsonSerializerOptions

Returns

TypeMap

ReadString(JsonElement)

private TypeMap ReadString(JsonElement jsonElement)

Parameters

jsonElement JsonElement

Returns

TypeMap
private static bool TryWriteAsLink(Utf8JsonWriter writer, TypeMap typeMap)

Parameters

writer Utf8JsonWriter
typeMap TypeMap

Returns

bool

Write(Utf8JsonWriter, TypeMap, JsonSerializerOptions)

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, TypeMap typeMap, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

typeMap TypeMap
options JsonSerializerOptions

An object that specifies serialization options to use.

WriteEntity(ASEntity, Type, JsonObject, SerializationMetadata)

private static void WriteEntity(ASEntity entity, Type entityType, JsonObject outputNode, SerializationMetadata meta)

Parameters

entity ASEntity
entityType Type
outputNode JsonObject
meta SerializationMetadata

WriteTypeMap(TypeMap, JsonObject, SerializationMetadata)

private static void WriteTypeMap(TypeMap typeMap, JsonObject outputNode, SerializationMetadata meta)

Parameters

typeMap TypeMap
outputNode JsonObject
meta SerializationMetadata