Class DriverIdJsonConverter
Converter for DriverId instances
Inherited Members
Namespace: DuetAPI.Utility
Assembly: DuetAPI.dll
Syntax
public sealed class DriverIdJsonConverter : JsonConverter<DriverId>
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read an instance from JSON
Declaration
public override DriverId? 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 |
|---|---|
| DriverId |
Overrides
Write(Utf8JsonWriter, DriverId?, JsonSerializerOptions)
Write an instance to JSON
Declaration
public override void Write(Utf8JsonWriter writer, DriverId? value, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | JSON writer |
| DriverId | value | Value to write |
| JsonSerializerOptions | options | JSON options |