Click or drag to resize

GeometryFromJson Method (String, SpatialReference)

Creates a geometry from an ArcGIS JSON representation.

Namespace:  Esri.ArcGISRuntime.Geometry
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.9.0
Syntax
public static Geometry FromJson(
	string json,
	SpatialReference spatialReference
)

Parameters

json
Type: SystemString
JSON representation of geometry.
spatialReference
Type: Esri.ArcGISRuntime.GeometrySpatialReference
The spatial reference for the geometry.

Return Value

Type: 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.

See Also