Class IntPairJsonConverter
- Assembly
- VisioForge.Core.dll
Converts an integer pair. Tuple<T1,T2> exposes Item1 and Item2 as read-only
properties, which IgnoreReadOnlyProperties drops - without this converter such a value is
written as an empty object and restored as 0/0.
public class IntPairJsonConverter : JsonConverter<Tuple<int, int>>Inheritance
Inherited Members
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type System.Tuple{System.Int32,System.Int32}.
public override Tuple<int, int> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)Parameters
readerUtf8JsonReader-
The reader.
typeToConvertType-
The type to convert.
optionsJsonSerializerOptions-
An object that specifies serialization options to use.
Returns
Write(Utf8JsonWriter, Tuple<int, int>, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, Tuple<int, int> value, JsonSerializerOptions options)Parameters
writerUtf8JsonWriter-
The writer to write to.
valueTuple<int, int>-
The value to convert to JSON.
optionsJsonSerializerOptions-
An object that specifies serialization options to use.