Show / Hide Table of Contents

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
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
Relevant samples
Show location history: Display your location history on the map.

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
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
In This Article
Back to top Copyright © 2022 Esri.