Class AnalogSensorTypeConverter
Class to convert an AnalogSensorType to and from JSON
Inherited Members
Namespace: DuetAPI.ObjectModel
Assembly: DuetAPI.dll
Syntax
public class AnalogSensorTypeConverter : JsonConverter<AnalogSensorType>
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read an AnalogSensorType from JSON
Declaration
public override AnalogSensorType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonReader | reader | JSON reader |
Type | typeToConvert | Type to convert |
JsonSerializerOptions | options | Serializer options |
Returns
Type | Description |
---|---|
AnalogSensorType | Read value |
Overrides
Write(Utf8JsonWriter, AnalogSensorType, JsonSerializerOptions)
Write an AnalogSensorType to JSON
Declaration
public override void Write(Utf8JsonWriter writer, AnalogSensorType value, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonWriter | writer | JSON writer |
AnalogSensorType | value | Value to serialize |
JsonSerializerOptions | options | Write options |