Skip to content

JSON column from GeoPackage is not read correctly #62377

Description

@marcus905

What is the bug or the crash?

When reading a column from a GeoPackage file (exported by QGIS itself from a PostGIS view) that contains a jsonb column, having verified that the data is correctly saved in it via SQLite DB Browser), the column is read incorrectly in the attribute pane:

  • if the column contains an object, QGIS shows only the key names instead of the object
  • if the column contains an array, QGIS shows an empty field

The same data loaded directly from the view is shown correctly.

Steps to reproduce the issue

  1. Load a PostGIS table with a jsonb column with data in it
  2. check that the attributes are correctly shown, both via the map (feature info tool) and via the attribute table
  3. export the layer to a geopackage
  4. open the geopackage
  5. try to do the same as 2. but the info is not shown correctly

Versions

QGIS version3.42.2-Münster
QGIS code revision402273f8c2
 
Libraries
Qt version5.15.13
Python version3.12.10
GDAL version3.10.3
PROJ version9.6.0
EPSG Registry database versionv12.004 (2025-03-02)
GEOS version3.13.1-CAPI-1.19.2
SQLite version3.46.1
PDAL version2.8.3
PostgreSQL client version17.3
SpatiaLite version5.1.0
QWT version6.3.0
QScintilla2 version2.14.1
OS versionWindows 11 Version 2009
 
Active Python plugins
batchvectorlayersaver0.9
Cxf_in9.2
db_manager0.1.20
grassprovider2.12.99
MetaSearch0.3.6
processing2.12.99

Also:

QGIS version3.44.0-Solothurn
QGIS code revision5d9ba037df1
 
Libraries
Qt version5.15.13
Python version3.12.11
GDAL version3.11.0 — Eganville
PROJ version9.6.2
EPSG Registry database versionv12.013 (2025-05-26)
GEOS version3.13.1-CAPI-1.19.2
SQLite version3.46.1
PDAL version2.9.0
PostgreSQL client version17.3
SpatiaLite version5.1.0
QWT version6.3.0
QScintilla2 version2.14.1
OS versionWindows 11 Version 2009
 
Active Python plugins
batchvectorlayersaver0.9
Cxf_in9.2
db_manager0.1.20
grassprovider2.12.99
MetaSearch0.3.6
processing2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!GUI/UXRelated to QGIS application GUI or User ExperienceWidgets

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions