IBM Support

JSON Publishing Functions



JSON publishing functions have been added to Db2 for i.


Look in the SQL Reference for complete details:

JSON_ARRAYAGG: The JSON_ARRAYAGG function returns a JSON array containing an array element
for each value in a set of JSON or SQL values.

JSON_OBJECTAGG: The JSON_OBJECTAGG function returns a JSON object containing a key:value pair
for each specific key and value in a set of SQL values.

JSON_ARRAY: The JSON_ARRAY function generates a JSON array either by explicitly listing the
array elements or by using a query.

JSON_OBJECT: The JSON_OBJECT function generates a JSON object using the specified key:value

The SQL Programming topic provides examples of using these functions to publish database content as JSON. Working with JSON data in SQL programming topic

Figure 1. Timeline of JSON support


[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
15 January 2020