Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ Point point = JsonConvert.DeserializeObject<Point>(json);

See the [Tests](https://github.com/GeoJSON-Net/GeoJSON.Net/tree/master/src/GeoJSON.Net.Tests) for more examples.

## Special considerations for ASP.Net Core 3+
## Special considerations for ASP.Net Core 3.1+

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:
System.Text.Json is the default (recommended) serializer. GeoJSON.Net **does not play well with System.Text.Json** and only supports Newtonsoft.Json

[GeoJSON.Text](https://github.com/GeoJSON-Net/GeoJSON.Text) is a fork of this repository and have been developed to support System.Text.Json.

If you still need to use Newtonsoft.Json in ASP.Net Core 3.1+, you must overwrite the default serializer.

- add the "Microsoft.AspNetCore.Mvc.NewtonsoftJson" NuGet Package
- add "services.AddControllers().AddNewtonsoftJson();" to your service configuration.

(Thanks for @jrowe88 for pointing this out)

## Contributing
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.

Expand Down