29#include <nlohmann/json_fwd.hpp> 
   30using namespace nlohmann;
 
  227    QString exportFeature( 
const QgsFeature &feature,
 
  228                           const QVariantMap &extraProperties = QVariantMap(),
 
  229                           const QVariant &
id = QVariant(),
 
  230                           int indent = -1 ) 
const;
 
  241    json exportFeatureToJsonObject( 
const QgsFeature &feature,
 
  242                                    const QVariantMap &extraProperties = QVariantMap(),
 
  243                                    const QVariant &
id = QVariant() ) const 
SIP_SKIP;
 
  253    QString exportFeatures( const 
QgsFeatureList &features, 
int indent = -1 ) const;
 
  290    bool mIncludeGeometry = true;
 
  293    bool mIncludeAttributes = true;
 
  296    bool mIncludeRelatedAttributes = false;
 
  305    bool mAttributeDisplayName = false;
 
  307    bool mTransformGeometries = true;
 
  311    bool mUseFieldFormatters = true;
 
 
  351    Q_INVOKABLE 
static QString encodeValue( 
const QVariant &value );
 
  362                                     const QVector<QVariant> &attributeWidgetCaches = QVector<QVariant>() );
 
  376        const QVector<QVariant> &attributeWidgetCaches = QVector<QVariant>(), 
bool useFieldFormatters = 
true ) 
SIP_SKIP;
 
  385    Q_INVOKABLE 
static QVariantList parseArray( 
const QString &json, QMetaType::Type type = QMetaType::Type::UnknownType );
 
  395    Q_INVOKABLE Q_DECL_DEPRECATED 
static QVariantList parseArray( 
const QString &json, QVariant::Type type ) 
SIP_DEPRECATED;
 
  414    static QgsGeometry geometryFromGeoJson( 
const QString &geometry );
 
  421    static json jsonFromVariant( 
const QVariant &v ) 
SIP_SKIP;
 
  430    static QVariant parseJson( 
const std::string &jsonString ) 
SIP_SKIP;
 
  439    static QVariant parseJson( 
const std::string &jsonString, QString &error ) 
SIP_SKIP;
 
  446    static QVariant parseJson( 
const QString &jsonString ) 
SIP_SKIP;
 
  453    static QVariant jsonToVariant( 
const json &value ) 
SIP_SKIP;
 
 
Represents a coordinate reference system (CRS).
 
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
 
Container of fields for a vector layer.
 
A geometry is the spatial representation of a feature.
 
Handles exporting QgsFeature features to GeoJSON features.
 
void setIncludeGeometry(bool includeGeometry)
Sets whether to include geometry in the JSON exports.
 
void setIncludeRelated(bool includeRelated)
Sets whether to include attributes of features linked via references in the JSON exports.
 
void setPrecision(int precision)
Sets the maximum number of decimal places to use in geometry coordinates.
 
void setAttributes(const QgsAttributeList &attributes)
Sets the list of attributes to include in the JSON exports.
 
bool attributeDisplayName() const
Returns whether original names of attributes or aliases are printed.
 
QgsAttributeList excludedAttributes() const
Returns a list of attributes which will be specifically excluded from the JSON exports.
 
void setUseFieldFormatters(bool useFieldFormatters)
Sets whether field formatters (of type KeyValue, List, ValueRelation, ValueMap) are used to export ra...
 
void setIncludeAttributes(bool includeAttributes)
Sets whether to include attributes in the JSON exports.
 
bool useFieldFormatters() const
Returned whether field formatters (of type KeyValue, List, ValueRelation, ValueMap) are used to expor...
 
void setTransformGeometries(bool activate)
Sets whether geometries should be transformed in EPSG 4326 (default behavior) or just keep as it is.
 
void setAttributeDisplayName(bool displayName)
Sets whether to print original names of attributes or aliases if defined.
 
QgsAttributeList attributes() const
Returns the list of attributes which will be included in the JSON exports, or an empty list if all at...
 
void setExcludedAttributes(const QgsAttributeList &attributes)
Sets a list of attributes to specifically exclude from the JSON exports.
 
bool includeAttributes() const
Returns whether attributes will be included in the JSON exports.
 
int precision() const
Returns the maximum number of decimal places to use in geometry coordinates.
 
bool includeRelated() const
Returns whether attributes of related (child) features will be included in the JSON exports.
 
bool includeGeometry() const
Returns whether geometry will be included in the JSON exports.
 
Helper utilities for working with JSON and GeoJSON conversions.
 
Represents a vector layer which manages a vector based dataset.
 
QList< QgsFeature > QgsFeatureList
 
QList< int > QgsAttributeList
 
const QgsCoordinateReferenceSystem & crs