Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32752

JSON_SCHEMA_VALID: schema does not allow an array of objects

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.1.2
    • 11.1, 11.2
    • JSON
    • None
    • A VM Ware machine with Linux 5.4.0-163-generic #180-Ubuntu 2023 x86_64 x86_64 x86_64 GNU/Linux
      and
      a Docker container

    Description

      Description

      I'm not able to validate an array of objects.

      Verification

      I've tried to validate the following JSON schema with JSON_SCHEMA_VALID and it returned 0:

      SET @schema='{"type":"object","properties":{"dummy":{"type":"array","items":{"type":"object","properties":{"info1":{"type":"string"},"info2":{"type":"string"},"info3":{"type":"string"}}}}}}';
       
      SELECT JSON_SCHEMA_VALID(@schema, '{"dummy":[{"info1":"a","info2":"a","info3":"a"}]}') as "Dummy Teste";
      

      Misc

      I've tested with others JSON Schema validators in C#, JavasScript, Python3 and all of those gave me a correct answer. I've tried to find any test related to list of objects (func json test) but couldn't find any.

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            hspadim-kptl Henrique Spadim
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.