JSON classes

Gives a basic introduction to JSON.

What is JSON?

JSON (JavaScriptâ„¢ Object Notation) is a well known lightweight data-interchange format for JavaScript.

A JSON string (or object) is a comma-separated list of name/value pairs, with a : colon separating the key and the value. The list of name/value pairs is enclosed in {} curly braces. The names are delimited by double-quotes. The value can be a single numeric value, a double-quotes string, an array, or a sub-element. Arrays are defined by a comma-separated list of values enclosed in [] square brackets. Sub-elements are defined inside {} curly braces and defineds name/value pairs.

For example:
{
   "cust_num":865234,
   "cust_name":"McCarlson",
   "order_ids":[234,3456,24656,34561],
   "address": {
          "street":"34, Sunset Bld",
          "city":"Los Angeles",
          "state":"CA"
        }
}

For more details, see http://www.json.org.

JSON utility classes

The util library provides a set of JSON classes to convert JSON documents to/from RECORD and ARRAY variables, and to manipulate JSON objects, if you need to handle JSON objects that do not map to a RECORD or ARRAY: