Switch to using an anonymous type for serialisation

Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
Dean Herbert 2021-01-09 00:38:38 +09:00 committed by GitHub
parent a6766e64de
commit 9182f5dafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ internal class JsonPointConverter : JsonConverter<Point>
public override void WriteJson(JsonWriter writer, Point value, JsonSerializer serializer)
{
// use the format of LaborSharp's Point since it is nicer.
serializer.Serialize(writer, new SixLabors.ImageSharp.Point(value.X, value.Y));
serializer.Serialize(writer, new { value.X, value.Y });
}
public override Point ReadJson(JsonReader reader, Type objectType, Point existingValue, bool hasExistingValue, JsonSerializer serializer)