qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.68k stars 3.02k forks source link

JSON value with URL column seems empty on QGIS Windows versions #57519

Open muratkendir opened 6 months ago

muratkendir commented 6 months ago

JSON value with URL column seems empty on QGIS Windows versions

I have a sample JSON file which contains nested data. The first parent key is "properties" and does not contain any URL-like value. This shown perfectly on both of Windows and Linux machines. However, the second parent key is "geometries" and contain multiple key-value pairs contain URL-like values. This column shown again perfectly on Linux QGIS, but it seems empty on Windows QGIS versions.

It seems like QGIS on Linux can handle this data by adding an escape character before the "/" forward slash, but somehow it is not possible on Windows versions.

I have a sample JSON file with nested data. The first parent key is "properties" and does not contain any URL-like values. This was perfectly shown on both Windows and Linux machines. However, the second parent key contains "geometries" and multiple key-value pairs with URL-like values. This column is again perfectly shown on Linux QGIS, while it appears empty on Windows QGIS versions (3.34.7 & 3.36.3).

It seems that QGIS on Linux can handle this data by adding an escape character before the forward slash "/", but somehow this is not possible on Windows versions.

Sample JSON file: bldg_001.json

Attribute table on Windows QGIS: 2024-05-22 12_18_11-Window Attribute table on Linux QGIS: Screenshot from 2024-05-22 14-37-38 Attribute table with JSON-View widget on Linux QGIS: Screenshot from 2024-05-22 14-39-11

Steps to reproduce the issue

Steps for Windows version. Add sample JSON file. (see attach.) Select the layer belongs to added JSON. Click F6 or open Attribute Table. Check the "geometries" column.

Versions

3.36.3 (on Windows) 3.34.7 (on Windows)

Supported QGIS version

New profile

Additional context

I checked the installed JSON libraries on both of systems. Following libraries are already installed on both them: python3-simplejson, python3-jsonschema, python3-jsonschema-specifications

elpaso commented 6 months ago

@muratkendir FYI python is not involved here, the libraries are not relevant (thanks you for reporting the detail anyway, the more details the better).

muratkendir commented 6 months ago

Let me know if you need any specific details. I didn't check the code, I just shared libraries that might be related to functionality.