Feature request #17040
Add PostgreSQL support for JSON field types along with UUID, XML, arrays, etc…
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||24939|
To help with outputting to web maps with Leaflet or others, could PostgreSQL columns with the JSON data type be seen as a string?
Assuming I'm reading things correctly in the GitHub repo, at src/providers/postgres/qgspostgresprovider.cpp line 906 is an if clause of types that are seen as strings by QGIS, so all that would be needed would be a two extra lines for "json" and "jsonb". That way JSON columns could at least be seen and edited just like how XML and UUID columns are allowed, rather than ignored as they are now.
As an example usage case, I'm making an animated timeline map of the territorial evolution (also with the Time Manager plugin) and I wanted to have columns for predecessors for territories that merge and split (e.g. the four original provinces becoming Canada, the USSR splitting into independent countries) so when I make the web map I can write code to generate clickable links that reverse or fast-forward to the timeline positions where those predecessors or successors appear.
Thanks in advance!