GeoJSON.Net is a .NET library for the RFC 7946 The GeoJSON Format and it uses and provides Newtonsoft Json.NET converters for serialization and deserialization of GeoJSON data.
Unity has historically used .NET 3.5 which limited C# programmers to C# 3.0 language features. As of Unity 2017, an experimental .NET 4.6 Runtime version has been introduced allowing C# 6.0 features. However, because GeoJson.NET is written with the latest language features, it is still incompatible with Unity. This project will serve as a continuous backport of GeoJson.NET to .NET 4.6 while preserving features and bug-fixes.
Download and import the .unitypackage to your project.
Position position = new Position(51.899523, -2.124156);
Point point = new Point(position);
string json = JsonConvert.SerializeObject(point);
string json = "{\"coordinates\":[-2.124156,51.899523],\"type\":\"Point\"}";
Point point = JsonConvert.DeserializeObject<Point>(json);
See the Tests for more examples.