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

JSON path expression with dashes doesn't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.9.4
    • Fix Version/s: N/A
    • Component/s: N/A
    • Labels:
    • Environment:
      Tested on Windows but would assume it affects all platforms

      Description

      According to https://mariadb.com/kb/en/jsonpath-expressions/ a path expression with special characters can be quoted as shown below. But doing so returns NULL rather than the JSON data it should. Example is hierarchy from a Chrome Lighthouse report.

      SET @json = '{"audits":{"first-contentful-paint":{}}}' ;
       
      SELECT
      JSON_VALID(@json),
      JSON_QUERY(
      	@json,
      	'$.audits'
      ),
      JSON_QUERY(
      	@json,
      	'$.audits."first-contentful-paint"'
      ),
      1;
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              noyearzero Ryan Leadenham
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration

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