Skip to content

Commit e8240ad

Browse files
Updating readme
1 parent f56d834 commit e8240ad

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
1-
# GeoJSON.NET
21
[![NuGet Version](http://img.shields.io/nuget/v/GeoJSON.NET.svg?style=flat)](https://www.nuget.org/packages/GeoJSON.NET/)
3-
42
[![Build status](https://ci.appveyor.com/api/projects/status/n4q1opb6dod0hwac?svg=true)](https://ci.appveyor.com/project/matt-lethargic/geojson-net)
53

4+
# GeoJSON.NET
65
GeoJSON.Net is a .NET library for the [RFC 7946 The GeoJSON Format](https://tools.ietf.org/html/rfc7946) and it uses and provides [Newtonsoft Json.NET](http://json.codeplex.com) converters for serialization and deserialization of GeoJSON data.
76

87

98
## Installation & Usage
10-
Well all you basically have to do is install the [GeoJSON.Net](https://www.nuget.org/packages/GeoJSON.Net/) NuGet package:
119

12-
`PM> Install-Package GeoJSON.Net`
10+
[GeoJSON.Net NuGet package](https://www.nuget.org/packages/GeoJSON.Net/):
11+
`Install-Package GeoJSON.Net.Contrib.MsSqlSpatial`
1312

14-
To deserialize a json string:
13+
### Serialization
1514

16-
`var geoJsonObject = JsonConvert.DeserializeObject<Point>(json);`
15+
```csharp
16+
Position position = new Position(51.899523, -2.124156);
17+
Point point = new Point(position);
1718

18-
That's all there is. Really. From there on you can go ahead and (De-)Serialize GeoJSON using the provided [converters](https://github.com/GeoJSON-Net/GeoJSON.Net/tree/master/src/GeoJSON.Net/Converters) - see [the Tests for example usage](https://github.com/GeoJSON-Net/GeoJSON.Net/tree/master/src/GeoJSON.Net.Tests).
19+
string json = JsonConvert.SerializeObject(point);
20+
```
1921

22+
### Deserialization
2023

21-
## News
22-
It's probably best to check out the [commits](https://github.com/GeoJSON-Net/GeoJSON.Net/commits/master) and the [issues](https://github.com/GeoJSON-Net/GeoJSON.Net/issues) what has been added over time.
24+
```csharp
25+
string json = "{\"coordinates\":[-2.124156,51.899523],\"type\":\"Point\"}";
2326

24-
## Contributing
25-
Highly welcome! Just fork away and send a pull request.
27+
Point point = JsonConvert.DeserializeObject<Point>(json);
28+
```
2629

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

28-
## Thanks
29-
This library would be NOTHING without its [contributors](https://github.com/GeoJSON-Net/GeoJSON.Net/graphs/contributors) - thanks so much!!
3032

31-
## Copyright
32-
33-
Copyright © 2017 Jörg Battermann & [Contributors](https://github.com/GeoJSON-Net/GeoJSON.Net/graphs/contributors)
34-
35-
## License
33+
## News
34+
It's probably best to check out the [commits](https://github.com/GeoJSON-Net/GeoJSON.Net/commits/master)
35+
and the [issues](https://github.com/GeoJSON-Net/GeoJSON.Net/issues) what has been added over time.
3636

37-
GeoJSON.Net is licensed under [MIT](http://www.opensource.org/licenses/mit-license.php "Read more about the MIT license form"). Refer to [LICENSE.md](https://github.com/GeoJSON-Net/GeoJSON.Net/blob/master/LICENSE.md) for more information.
37+
## Contributing
38+
Highly welcome! Just fork away and send a pull request. We try and review most pull requests within a couple of days.
3839

40+
## Thanks
41+
This library would be NOTHING without its [contributors](https://github.com/GeoJSON-Net/GeoJSON.Net/graphs/contributors) - thanks so much!!

0 commit comments

Comments
 (0)