From bf9f9673fcf21a7f10a17b31085a7f99a137a6a6 Mon Sep 17 00:00:00 2001 From: Michael Haken Date: Fri, 5 Mar 2021 13:41:34 -0500 Subject: [PATCH] Fixed CanConvert method. --- GeoJSON/GeoJSON.csproj | 4 ++-- GeoJSON/Serde/PolygonConverter.cs | 2 +- README.md | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/GeoJSON/GeoJSON.csproj b/GeoJSON/GeoJSON.csproj index 9184852..bc148f0 100644 --- a/GeoJSON/GeoJSON.csproj +++ b/GeoJSON/GeoJSON.csproj @@ -4,7 +4,7 @@ netstandard1.6;netstandard2.0;net45 1.6 BAMCIS.GeoJSON - 2.3.0 + 2.3.1 Michael Haken bamcis.io A .NET Core library for serializing and deserializing GeoJSON formatted JSON data. Complies with RFC 7946. @@ -16,7 +16,7 @@ https://github.com/bamcis-io/GeoJSON Git GeoJSON RFC7946 - Added Well-Known Binary serialization and deserialization support for `Geometry` objects. + Fixed a bug in the Polygon serde. true GeoJSON.snk false diff --git a/GeoJSON/Serde/PolygonConverter.cs b/GeoJSON/Serde/PolygonConverter.cs index e7c1e79..2a51fa0 100644 --- a/GeoJSON/Serde/PolygonConverter.cs +++ b/GeoJSON/Serde/PolygonConverter.cs @@ -23,7 +23,7 @@ public class PolygonConverter : JsonConverter public override bool CanConvert(Type objectType) { - return objectType == typeof(MultiPolygon); + return objectType == typeof(Polygon); } /// diff --git a/README.md b/README.md index 4428e24..4b413ef 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,9 @@ Feature geo = JsonConvert.DeserializeObject(content); ## Revision History +### 2.3.1 +Fixed the Polygon serde CanConvert method. + ### 2.3.0 Added Well-Known Binary serialization and deserialization support for `Geometry` objects.