File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/GeoJSON.Text/Converters Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace GeoJSON.Text.Converters
1010 /// <summary>
1111 /// Converts <see cref="ICRSObject"/> types to and from JSON.
1212 /// </summary>
13- public class CrsConverter : JsonConverter < object >
13+ public class CrsConverter : JsonConverter < ICRSObject >
1414 {
1515 public override bool HandleNull => true ;
1616
@@ -41,7 +41,7 @@ public override bool CanConvert(Type objectType)
4141 /// or
4242 /// CRS must have a "type" property
4343 /// </exception>
44- public override object Read (
44+ public override ICRSObject Read (
4545 ref Utf8JsonReader reader ,
4646 Type type ,
4747 JsonSerializerOptions options )
@@ -106,7 +106,8 @@ public override object Read(
106106 }
107107 }
108108
109- return new NotSupportedException ( string . Format ( "Type {0} unexpected." , crsType ) ) ;
109+ //return new NotSupportedException(string.Format("Type {0} unexpected.", crsType));
110+ return null ;
110111 }
111112
112113 /// <summary>
@@ -118,7 +119,7 @@ public override object Read(
118119 /// <exception cref="System.ArgumentOutOfRangeException"></exception>
119120 public override void Write (
120121 Utf8JsonWriter writer ,
121- object crsValue ,
122+ ICRSObject crsValue ,
122123 JsonSerializerOptions options )
123124 {
124125 var value = ( ICRSObject ) crsValue ;
You can’t perform that action at this time.
0 commit comments