Skip to main content

JSON (Tools/APIs)

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 tab and ECMA-404Opens in a new tab. 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® data platform 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 tab, %DynamicArrayOpens in a new tab, and %DynamicAbstractObjectOpens in a new tab (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 tab and %DynamicArrayOpens in a new tab, respectively. For details, see Using JSON.

Availability: All namespaces.

FeedbackOpens in a new tab