Overview
This topic discusses the JSON representation of feature sets. The feature
object contains feature objects, including the values for the fields requested by the user. For layers, if you request geometry information, the geometry of each feature is also returned in the feature
. For tables, the feature
does not include geometries.
{
"objectIdFieldName": "<objectIdFieldName>", //optional
"globalIdFieldName": "<globalIdFieldName>", //optional
"displayFieldName": "<displayFieldName>", //optional
"geometryType": "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryEnvelope>",
"spatialReference": <spatialReference>, //for feature layers only.
"hasZ": <true|false>, //optional Default is false.
"hasM": <true|false>, //optional Default is false.
"fields": [
{"name": "<fieldName1>", "type": "<fieldType1>", "alias": "<fieldAlias1>", "length": "<length1>"},
{"name": "<fieldName2>", "type": "<fieldType2>", "alias": "<fieldAlias2>", "length": "<length2>"}
],
"features": [ //features will include geometry for feature layers only
<feature1>,
<feature2>
]
}