jsonUtils

AMD: require(["esri/renderers/support/jsonUtils"], (rendererJsonUtils) => { /* code goes here */ });
ESM: import * as rendererJsonUtils from "@arcgis/core/renderers/support/jsonUtils.js";
Object: esri/renderers/support/jsonUtils
Since: ArcGIS Maps SDK for JavaScript 4.0

Provides a utility method used to deserialize a JSON renderer object returned by the REST API.

Method Overview

Name Return Type Summary Object

Creates a new instance of an appropriate Renderer class and initializes it with values from a JSON object generated from an ArcGIS product.

jsonUtils

Method Details

fromJSON

Method
fromJSON(json){Renderer}

Creates a new instance of an appropriate Renderer class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
Type Description
Renderer Returns a new instance of an appropriate Renderer class.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.