You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Create dotnet.yml
* Updated the readme to point to geojson.text for system.text.json support
Co-authored-by: Martin Boje Carpentier <mbc@kamstrup.com>
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,15 +28,17 @@ Point point = JsonConvert.DeserializeObject<Point>(json);
28
28
29
29
See the [Tests](https://github.com/GeoJSON-Net/GeoJSON.Net/tree/master/src/GeoJSON.Net.Tests) for more examples.
30
30
31
-
## Special considerations for ASP.Net Core 3+
31
+
## Special considerations for ASP.Net Core 3.1+
32
32
33
-
System.Text.Json is the default (recommended) serializer. GeoJSON.Net **does not play well with System.Text.Json**. Here are the recommended steps as a workaround:
33
+
System.Text.Json is the default (recommended) serializer. GeoJSON.Net **does not play well with System.Text.Json** and only supports Newtonsoft.Json
34
+
35
+
[GeoJSON.Text](https://github.com/GeoJSON-Net/GeoJSON.Text) is a fork of this repository and have been developed to support System.Text.Json.
36
+
37
+
If you still need to use Newtonsoft.Json in ASP.Net Core 3.1+, you must overwrite the default serializer.
34
38
35
39
- add the "Microsoft.AspNetCore.Mvc.NewtonsoftJson" NuGet Package
36
40
- add "services.AddControllers().AddNewtonsoftJson();" to your service configuration.
37
41
38
-
(Thanks for @jrowe88 for pointing this out)
39
-
40
42
## Contributing
41
43
Highly welcome! Just fork away and send a pull request. We try and review most pull requests within a couple of days. There is now a version 2.0.0 branch. I've created this ready for any breaking changes and any extra features and would encourage anything that isn't a bug fix to go in there.
0 commit comments