plsql-cop-cli icon indicating copy to clipboard operation
plsql-cop-cli copied to clipboard

Parse error when using JSON_modifier_list with JSON_scalar_modifier

Open PhilippSalvisberg opened this issue 1 year ago • 1 comments

The following use of JSON_modifier_list works:

select cast('[1,2,3]' as json) is json value;
select cast('[1,2,3]' as json) is json object;
select cast('[1,2,3]' as json) is json array;
select cast('[1,2,3]' as json) is json (array, object, value);
select cast('[1,2,3]' as json) is json scalar;

However, when using a JSON_scalar_modifier a syntax error is produced:

select cast('1' as json) is json scalar number;
select cast('2' as json) is json scalar string;
select cast('3' as json) is json scalar binary_double;
select cast('4' as json) is json (scalar binary_double, scalar number, scalar string);

PhilippSalvisberg avatar Jul 01 '24 11:07 PhilippSalvisberg

Functionality worked in 23.3 but was not documented in F47038-0 which was the basis for the implementation. Hence I tag it with 23.4

PhilippSalvisberg avatar Jul 03 '24 09:07 PhilippSalvisberg