Table of Contents

Class JsonModelDictionaryConverter

Namespace
DuetAPI.ObjectModel
Assembly
DuetAPI.dll

Converter factory class for JsonModelDictionary types

public class JsonModelDictionaryConverter : JsonConverter<JsonModelDictionary>
Inheritance
JsonModelDictionaryConverter
Inherited Members

Constructors

JsonModelDictionaryConverter()

public JsonModelDictionaryConverter()

Methods

CanConvert(Type)

Checks if the given type can be converted

public override bool CanConvert(Type typeToConvert)

Parameters

typeToConvert Type

Type to convert

Returns

bool

Whether the type can be converted

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Read from JSON

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

Parameters

reader Utf8JsonReader

JSON reader

typeToConvert Type

Type to convert

options JsonSerializerOptions

Read options

Returns

JsonModelDictionary

Read value

Write(Utf8JsonWriter, JsonModelDictionary, JsonSerializerOptions)

Write a CodeParameter to JSON

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

Parameters

writer Utf8JsonWriter

JSON writer

value JsonModelDictionary

Value to serialize

options JsonSerializerOptions

Write options