Class Severity.SeverityJsonConverter
Reads/writes a Severity as a plain JSON string.
Inherited Members
Namespace: ZhEaIsNsAaBn.Utilities
Assembly: ZhEaIsNsAaBn.LayerResponse.dll
Syntax
public sealed class Severity.SeverityJsonConverter : JsonConverter<Severity>
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads a plain JSON string into the matching severity.
Declaration
public override Severity? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonReader | reader | The JSON reader, positioned on the severity value. |
| Type | typeToConvert | Always Severity. |
| JsonSerializerOptions | options | The serializer options. |
Returns
| Type | Description |
|---|---|
| Severity | The matching severity; Unknown for |
Overrides
Exceptions
| Type | Condition |
|---|---|
| JsonException | The JSON value is not a string. |
Write(Utf8JsonWriter, Severity, JsonSerializerOptions)
Writes a severity as a plain JSON string.
Declaration
public override void Write(Utf8JsonWriter writer, Severity value, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | The JSON writer. |
| Severity | value | The severity to write; Unknown writes as |
| JsonSerializerOptions | options | The serializer options. |