Skip to content

JSON Viewer

A JSON viewer is a tool designed to present JSON data in a format that is easy to read and understand. This tool enables users to view and analyze JSON data effectively. It is particularly useful for developers, data analysts, and anyone else who regularly works with JSON data. By using a JSON viewer, you can efficiently navigate through complex data structures, debug code, and ensure data integrity by identifying and correcting errors.

In IFS Cloud JSON Viewer can be used to view JSON data in detail pages, assistants, or dialogs. The method of displaying JSON data may vary depending on its size as stored in the database.

json_viewer

Usage

JSON Viewer can be added to a page, assistant or a dialog:

jsonviewer JsonViewerExample; 

It is possible to override the Client Control Properties

Retrieving JSON Data

Marble syntax to retrieve JSON data lower than 64KB :

For JSON data that is smaller than 64KB, can be fetched alongside a normal record request as an attribute.

jsonviewer JsonViewerExample for JsonEntity {
   label = "Json Label";
   attribute = JsonAttribute
}

Marble syntax to retrieve JSON data larger than 64KB :

JSON data larger than 64KB can be fetched through a specific function call.

jsonviewer JsonViewerExample for JsonEntity {
   label = "Json Label";
   function = GetJsonFunction(RecordId);
}

Saving JSON Data

The storage of JSON data depends on its size; it can be accommodated in either a Character Large Object (CLOB) or a Binary Large Object (BLOB) field. Utilizing a BLOBfield is particularly advantageous for handling large data sets because it allows the data to be streamed directly to the client. This streaming capability significantly reduces the memory footprint on the server, enhancing overall system performance and scalability. This method is ideal for applications that require efficient data transmission and minimal server load.

Example : LongText - CLOB Function

function GetJsonFunction LongText {
   parameter Id Text;
}

Example : Stream - BLOB Function

function GetJsonFunction Stream {
   parameter Id Text;
}

Expand / Collapse Nodes

To expand or collapse a node, simply click on any part of the line. For recursive expansion or collapse of all nodes, hold down the Ctrl key while clicking.

Client Control Properties Associated With JSON Viewer

label | visible | collapsed

Limitations

  • The JSON Viewer is not designed to efficiently handle very large JSON structures. Users may experience slower navigation speeds within the JSON structure due to its limited capacity to manage substantial data sizes. This can impact the responsiveness of the viewer when working with extensive JSON data.

  • The JSON Viewer is not designed to handle deeply nested structures. Nodes may disappear depending on the screen size.

nested_struct