|
QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Helper utilities for working with JSON and GeoJSON conversions. More...
#include <qgsjsonutils.h>
Static Public Member Functions | |
| static QString | encodeValue (const QVariant &value) |
| Encodes a value to a JSON string representation, adding appropriate quotations and escaping where required. More... | |
| static QString | exportAttributes (const QgsFeature &feature) |
| Exports all attributes from a QgsFeature as a JSON map type. More... | |
| static QgsFeatureList | stringToFeatureList (const QString &string, const QgsFields &fields, QTextCodec *encoding) |
| Attempts to parse a GeoJSON string to a collection of features. More... | |
| static QgsFields | stringToFields (const QString &string, QTextCodec *encoding) |
| Attempts to retrieve the fields from a GeoJSON string representing a collection of features. More... | |
Helper utilities for working with JSON and GeoJSON conversions.
Definition at line 209 of file qgsjsonutils.h.
Encodes a value to a JSON string representation, adding appropriate quotations and escaping where required.
| value | value to encode |
Definition at line 236 of file qgsjsonutils.cpp.
|
static |
Exports all attributes from a QgsFeature as a JSON map type.
| feature | feature to export |
Definition at line 302 of file qgsjsonutils.cpp.
|
static |
Attempts to parse a GeoJSON string to a collection of features.
| string | GeoJSON string to parse |
| fields | fields collection to use for parsed features |
| encoding | text encoding |
Definition at line 226 of file qgsjsonutils.cpp.
|
static |
Attempts to retrieve the fields from a GeoJSON string representing a collection of features.
| string | GeoJSON string to parse |
| encoding | text encoding |
Definition at line 231 of file qgsjsonutils.cpp.
1.8.13