Skip To Content

Feature object

Description

This topic discusses the JSON feature object as returned by the REST API.

A feature consists of the following two properties. All properties are optional.

  • geometry—The feature geometry. It can be any of the supported geometry types. It is a JSON object as defined in the Geometry Objects documentation.

    Example: "geometry" : {"x" : -118.15, "y" : 33.80}

  • attributes—The feature attributes. It is a JSON object that contains a dictionary of name-value pairs. The names are the feature field names. The values are the field values, and they can be any of the standard JSON types: string, number, and boolean. Note that date values are encoded as numbers. The number represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Example:

"attributes" : {
  "OWNER" : "Joe Smith", //string
  "VALUE" : 94820.37, //number
  "APPROVED" : true, //boolean
  "LASTUPDATE" : 1227663551096 //date
}

JSON Response syntax

{
  "geometry" : <geometry>,

  "attributes" : {
    "name1" : <value1>,
    "name2" : <value2>,
  }
}

JSON Response example

{
  "geometry" : {"x" : -118.15, "y" : 33.80},

  "attributes" : {
    "OWNER" : "Joe Smith",
    "VALUE" : 94820.37,
    "APPROVED" : true,
    "LASTUPDATE" : 1227663551096
  }
}