diff --git a/zpa-checks/src/integrationTest/resources/expected/oracle-database_23/ParsingErrorCheck.json b/zpa-checks/src/integrationTest/resources/expected/oracle-database_23/ParsingErrorCheck.json index 279b2c17..ae7ecc40 100644 --- a/zpa-checks/src/integrationTest/resources/expected/oracle-database_23/ParsingErrorCheck.json +++ b/zpa-checks/src/integrationTest/resources/expected/oracle-database_23/ParsingErrorCheck.json @@ -2,9 +2,6 @@ "adjsn/clauses-used-in-functions-and-conditions-for-json-1.sql" : [ 4 ], - "adjsn/clauses-used-in-functions-and-conditions-for-json-14.sql" : [ - 9 - ], "adjsn/conditions-is-json-and-is-not-json-6.sql" : [ 6 ], diff --git a/zpa-core/src/main/kotlin/org/sonar/plugins/plsqlopen/api/SingleRowSqlFunctionsGrammar.kt b/zpa-core/src/main/kotlin/org/sonar/plugins/plsqlopen/api/SingleRowSqlFunctionsGrammar.kt index f1cf68ea..a41927bb 100644 --- a/zpa-core/src/main/kotlin/org/sonar/plugins/plsqlopen/api/SingleRowSqlFunctionsGrammar.kt +++ b/zpa-core/src/main/kotlin/org/sonar/plugins/plsqlopen/api/SingleRowSqlFunctionsGrammar.kt @@ -874,7 +874,7 @@ enum class SingleRowSqlFunctionsGrammar : GrammarRuleKey { b.optional(JSON_VALUE_RETURNING_CLAUSE), b.optional(JSON_VALUE_ON_ERROR_CLAUSE), b.optional(JSON_VALUE_ON_EMPTY_CLAUSE), - b.optional(JSON_VALUE_ON_MISMATCH_CLAUSE), + b.zeroOrMore(JSON_VALUE_ON_MISMATCH_CLAUSE), b.optional(TYPE, b.firstOf(STRICT, LAX)), RPARENTHESIS ) diff --git a/zpa-core/src/test/kotlin/org/sonar/plugins/plsqlopen/api/expressions/JsonValueTest.kt b/zpa-core/src/test/kotlin/org/sonar/plugins/plsqlopen/api/expressions/JsonValueTest.kt index 4507fc0b..f44dd7d3 100644 --- a/zpa-core/src/test/kotlin/org/sonar/plugins/plsqlopen/api/expressions/JsonValueTest.kt +++ b/zpa-core/src/test/kotlin/org/sonar/plugins/plsqlopen/api/expressions/JsonValueTest.kt @@ -65,7 +65,8 @@ class JsonValueTest : RuleTest() { returning varchar2(10) truncate error on error error on empty - error on mismatch + error on mismatch (missing data) + ignore on mismatch (extra data) type strict)""") }