Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

.Net library for GeoJSON types & corresponding Json.Net (de)serializers

License

NotificationsYou must be signed in to change notification settings

GeoJSON-Net/GeoJSON.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backers on Open CollectiveSponsors on Open CollectiveNuGet VersionBuild status

GeoJSON.NET

GeoJSON.Net is a .NET library for theRFC 7946 The GeoJSON Format and it uses and providesNewtonsoft Json.NET converters for serialization and deserialization of GeoJSON data.

Installation & Usage

GeoJSON.Net NuGet package:Install-Package GeoJSON.Net

Serialization

Positionposition=newPosition(51.899523,-2.124156);Pointpoint=newPoint(position);stringjson=JsonConvert.SerializeObject(point);

Deserialization

stringjson="{\"coordinates\":[-2.124156,51.899523],\"type\":\"Point\"}";Pointpoint=JsonConvert.DeserializeObject<Point>(json);

See theTests for more examples.

Special considerations for ASP.Net Core 3.1+

System.Text.Json is the default (recommended) serializer. GeoJSON.Netdoes not play well with System.Text.Json and only supports Newtonsoft.Json

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.

Contributing

Highly welcome! Just fork away and send a pull request. We try and review most pull requests within a couple of days.

Thanks

This library would be NOTHING without itscontributors - thanks so much!!

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

About

.Net library for GeoJSON types & corresponding Json.Net (de)serializers

Resources

License

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    Contributors28

    Languages


    [8]ページ先頭

    ©2009-2025 Movatter.jp