Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Object: esri/geometry/jsonUtils

Description

(Added at v3.8)
Utility methods for working with JSON geometry objects.

When coding legacy (non-AMD) style, there is no need to require the module. All methods and properties are available in the namespace. For example, esri.geometry.fromJson().

Samples

Search for samples that use this class.

Methods

NameReturn typeSummary
fromJson(json)GeometryConverts the input JSON object to the appropriate esri.geometry.* object.
getJsonType(geometry)StringRequests the geometry type name as represented in the ArcGIS REST.
Method Details

fromJson(json)

Converts the input JSON object to the appropriate esri.geometry.* object.
Return type: Geometry
Parameters:
<Object> json Required The JSON object.

getJsonType(geometry)

Requests the geometry type name as represented in the ArcGIS REST.
Return type: String
Parameters:
<Geometry> geometry Required The ArcGIS JavaScript API geometry type to be converted.
Show Modal