Table of Contents

Class DictionaryJsonConverter

Namespace
PopcorningGuineaPig.Engine.Scenes
Assembly
PopcorningGuineaPig.Engine.dll
public class DictionaryJsonConverter : JsonConverter<Dictionary<string, object>>
Inheritance
DictionaryJsonConverter
Inherited Members

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type Dictionary<string, object>.

public override Dictionary<string, object> 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

Dictionary<string, object>

The converted value.

Write(Utf8JsonWriter, Dictionary<string, object>, JsonSerializerOptions)

Writes a specified value as JSON.

[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Base JsonConverter<T>.Write is not annotated; IL2046 prevents [RequiresUnreferencedCode] propagation. DictionaryJsonConverter is only registered by SceneLoader.LoadScene, which is itself [RequiresUnreferencedCode] — reachability transitively requires the attribute.")]
public override void Write(Utf8JsonWriter writer, Dictionary<string, object> value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

value Dictionary<string, object>

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.