Skip to main content

JSON File Overview

JSON - JavaScript Object Notation, is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of name–value pairs and arrays (or other serializable values). The following details the use of the various JSON files used in the system.

Some basic information about the structure of JSON files. (see the County_master.json file below.

  1. Elements are arranged in key => value pairs (i.e., name => Delta).
  2. All text entities must be enclosed in double quotes (i.e.,  "name", "Delta")
  3. The key must be followed by a colon ( : ).
  4. All values (except the last one) must be followed by a comma ( , ). Note: no comma after the 50 on line 7 (last "color" value) nor the closing brace on line 8 (last "county" value).
  5. Multi level values must be enclosed in matching braces ( { } ). Open braces on lines 2 and 4 with closing braces on lines 8 and 9.
  6. Values with long text must be included on one line. If multi-lines are needed in the text display the HTML code (br> can be used but the whole text itself must be on one line (i.e., "This is a long line.<br>Followed by another long line.")
  7. The whole of the file content must also be enclosed in matching braces as shown in lines 1 and 10.

The files discussed in this area are included in the assets/json folder.