Oracle SQL JSON construct JSON Object
Your REST Client can consume JSON produced from a REST API. You can use Oracle SQL JSON functions to construct a JSON object and you can then use this to abstract out the source of the data. Your REST API client does not need to know that the data came from a set of tables. Here is an example of how to construct a JSON object. WITH t AS ( SELECT JSON_OBJECT ( 'measureDetails' VALUE ( SELECT JSON_ARRAYAGG(JSON_OBJECT('measureName' VALUE b.measure_name, 'classifications' VALUE JSON_ARRAYAGG(JSON_OBJECT('classification' ...