sql-formatter icon indicating copy to clipboard operation
sql-formatter copied to clipboard

db2i formatting does not work with JSON* functions

Open cmh716 opened this issue 6 months ago • 1 comments

Describe the bug JSON_OBJECT, JSON_ARRAY, JSON_ARRAGG, etc do not work with this plugin

Expected behavior I expect these statements to be formatted

Actual behavior The plugin returns a parse error

Usage You can reproduce the issue on IBMi systems db2i:

SELECT JSON_OBJECT('key':'val') FROM SYSIBM.SYSDUMMY1;

To return complex JSON objects from DB2i, it's not uncommon to have a lot of JSON_OBJECTS and ARRAY, ARRAYAGG nested.

cmh716 avatar Aug 30 '24 13:08 cmh716