Reader Overview

The JSON reader can read JSON text structured in several different ways. The only requirement is that every FME feature must be represented by a single JSON object or array. The reader turns these objects and arrays into FME features using a JSON query.

A JSON object feature is specified with an object key containing the value that becomes the FME feature type, and the key containing the value for the feature geometry. All other key/value pairs in the JSON object become attribute names/values. String values are UTF-16 encoded. Integer, real number or boolean values correspond to the attribute type. If the value of a key is a nested JSON object or array, then the actual JSON text becomes the value of the corresponding attribute. This behavior allows portions of the object or array to be retrieved using the JSONExtractor transformer.

If the feature is represented by an array, each value in the array becomes an attribute value. The attributes are assigned generic names attribute0, attribute1, attribute2, and so on, corresponding to the position of the value in the array. If an array element is a nested JSON object or array, the corresponding attribute value is the actual JSON text. A feature constructed in this manner has no geometry or coordinate system, and is assigned the default JSON feature type.

The reader can read from a local or network file, or a remote URL accessible via http or ftp. The reader can access URLs directly, or via a proxy server.