Method FromJson
FromJson(String)
Creates a Geometry from an ArcGIS JSON representation.
Declaration
public static Geometry FromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | JSON representation of geometry. |
Returns
Type | Description |
---|---|
Geometry | Geometry converted from a JSON String. |
Remarks
Geometry can be serialized and de-serialized to and from JSON. The ArcGIS REST API documentation describes the JSON representation of geometry objects. You can use this encoding and decoding mechanism to exchange geometries with REST Web services or to store them in text files.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |
Relevant samples
FromJson(String, SpatialReference)
Creates a geometry from an ArcGIS JSON representation.
Declaration
public static Geometry FromJson(string json, SpatialReference spatialReference)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | JSON representation of geometry. |
SpatialReference | spatialReference | The spatial reference for the geometry. |
Returns
Type | Description |
---|---|
Geometry | Geometry converted from a JSON String. |
Remarks
Geometry can be serialized and de-serialized to and from JSON. The ArcGIS REST API documentation describes the JSON representation of geometry objects. You can use this encoding and decoding mechanism to exchange geometries with REST Web services or to store them in text files.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |