Class ObjectModelConverter
Class used to convert model objects to and from JSON
Inherited Members
Namespace: DuetAPI.ObjectModel
Assembly: DuetAPI.dll
Syntax
public class ObjectModelConverter : JsonConverter<ObjectModel>
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read a machine model object from a JSON reader
Declaration
public override ObjectModel? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonReader | reader | JSON reader |
Type | typeToConvert | Target type |
JsonSerializerOptions | options | JSON options |
Returns
Type | Description |
---|---|
ObjectModel | Machine model |
Overrides
Write(Utf8JsonWriter, ObjectModel, JsonSerializerOptions)
Write a machine model to a JSON writer
Declaration
public override void Write(Utf8JsonWriter writer, ObjectModel value, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonWriter | writer | JSON writer |
ObjectModel | value | Machine model |
JsonSerializerOptions | options | JSON options |