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

JSON_TABLE() does not decode JSON strings properly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.11.7
    • 10.6.20, 10.11.10, 11.4.4
    • JSON
    • None
    • Debian 11

    Description

      When you use JSON_VALUE to get the value of a string, it correctly decodes any escaped characters. For example, \u003d is correctly decoded to =

       JSON_VALUE(respBody, '$.data.files[0].content') -- WORKS!!
      

      When I try to use JSON_TABLE things like \u003d are NOT decoded.
      So, for example, decoding some base64 fails because \u003d is present instead of =

      SELECT * FROM JSON_TABLE(respBody, '$.data.files[*]' COLUMNS(
         filename VARCHAR(255) path '$.filename', 
         folder BOOLEAN path '$.folder',
         size INTEGER path '$.size',
         timestamp DATETIME path '$.timestamp', 
         content MEDIUMTEXT path '$.content'
        )
      ) AS files
      

      It would be great if this could be fixed soon so my workarounds don't keep piling up!
      Thank you!

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              rdyas Robert Dyas
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.