JSON (JavaScript Object Notation) Writer Parameters
Document Parameters
Specifies the document structure of the output file.
-
Array of feature objects (default) – The document will contain a root array with features written as objects in the array.
-
Single feature object (writes first feature only) – The document will contain the first feature written as a single object. All other features will not be written.
Feature Object Parameters
Specifies whether the feature type key should be written.
Specifies
the JSON object key that contains the feature type of the FME
feature produced from the object. If no value is provided, json_featuretype is used.
Specifies whether the geometry should be written.
Specifies
the JSON object key that contains the geometry of the FME feature
produced from the object. If no value is provided, json_geometry is used.
Specifies the geometry format that the reader should use when converting the value of Geometry Key Name into FME geometry. If no value is provided, GeoJSON is used.
Write Coordinate System
Specifies the JSON object key that contains the coordinate system. The default value is json_ogc_wkt_crs.
Specifies the coordinate system format. The default selection, OGC-WKT, writes the entire coordinate system definition. Choosing Name Only writes only the FME coordinate system name.
Specifies whether the writer should produce output with nested objects and arrays, or a flat structure where attributes are written as simple key/value pairs.
- When set to Yes (the default), attribute names that include dots or list notation (for example, my_object.value or my_object.list{}) are written as nested JSON objects or arrays.
- When set to No, attributes are written as flat key/value pairs using their full names as keys (for example, “my_object.int_value”).
Writer Parameters
The character set encoding in which the GeoJSON text will be written. If no character set is specified, the GeoJSON text is written in the UTF-8 character set.
Specifies if the JSON writer should preface the JSON text with a byte order marker to indicate the endianness of the Unicode text. The default value is No.
Formatting Parameters
The formatting of the output JSON file.
- Linear – The entire JSON document is output on one line. This option produces the smallest possible JSON files.
- Pretty Print – The JSON document will contain additional whitespace characters, making it much more human-readable.
This parameter controls the indentation style in the JSON document, and is enabled when Formatting Type is Pretty Print. The indentation style can use either tab characters, or a variable number of space characters.
The writer will use the value of this parameter to limit the number of decimal digits printed for each coordinate.
Valid values range from 1 to 15. The default value gives sub-millimeter accuracy when writing WGS84 coordinates. A lower number of digits can dramatically reduce the size of the output file when writing out a large number of coordinates.
This parameter has no effect on attribute values that contain floating point numbers.