Class StringOrNumberConverter
Reads a JSON string or number as text, as call versions are either; writes text.
Inherited Members
Namespace: Uniform.Matrix.Protocol.Core
Assembly: Uniform.Matrix.Protocol.Core.dll
Syntax
public sealed class StringOrNumberConverter : JsonConverter<string>
Methods
| Edit this page View SourceRead(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read a string, or a number as its text.
Declaration
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonReader | reader | |
| Type | typeToConvert | |
| JsonSerializerOptions | options |
Returns
| Type | Description |
|---|---|
| string |
Overrides
| Edit this page View SourceWrite(Utf8JsonWriter, string, JsonSerializerOptions)
Write text.
Declaration
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | |
| string | value | |
| JsonSerializerOptions | options |