Skip to main content

JSON

Create, use, and modify JSON-format objects and arrays; serialize objects as JSON; create objects from JSON.

Background Information

JSON (JavaScript Object Notation) is a lightweight, human-readable data interchange format, described by RFC 7159Opens in a new window and ECMA-404Opens in a new window. It is commonly used in client-server communications.

Available Tools

dynamic object and dynamic array classes

A dynamic object is a special kind of InterSystems IRIS object that has no schema. Instead, such an object is empty, and you can create properties simply by using assignment statements. A dynamic array is similar.

Dynamic objects and arrays are defined by three classes: %DynamicObjectOpens in a new window, %DynamicArrayOpens in a new window, and %DynamicAbstractObjectOpens in a new window (the common superclass).

These classes provide methods to serialize themselves to and from JSON. For details, see Using JSON.

Availability: All namespaces.

dynamic object and dynamic array expressions

ObjectScript provides support for JSON-format object and array expressions, which return instances of %DynamicObjectOpens in a new window and %DynamicArrayOpens in a new window, respectively. For details, see Using JSON.

Availability: All namespaces.

FeedbackOpens in a new window