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
typeToConvertTypeType 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
readerUtf8JsonReaderJSON reader
typeToConvertTypeType to convert
optionsJsonSerializerOptionsRead 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
writerUtf8JsonWriterJSON writer
valueJsonModelDictionaryValue to serialize
optionsJsonSerializerOptionsWrite options