Пример #1
0
 public override void Write(
     Utf8JsonWriter writer,
     Vector2 v,
     JsonSerializerOptions options)
 => writer.WriteStringValue(ConvertCommon.Vector2Writer(v));
Пример #2
0
 public override Vector2 Read(
     ref Utf8JsonReader reader,
     Type typeToConvert,
     JsonSerializerOptions options)
 => ConvertCommon.Vector2Reader(reader.GetString());