IBM Support

JSON Publishing Functions

News


Abstract

JSON publishing functions have been added to Db2 for i.

Content

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
pairs.

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

image-20200115131631-1

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
15 January 2020

UID

ibm11116411