![]() If there is already an item with the key key, then that item's value is replaced with value. Inserts a new item with the key key and a value of value. QJsonObject::iterator QJsonObject:: insert(const QString & key, const QJsonValue & value) See also fromVariantHash(), toVariantMap(), and QJsonValue::fromVariant(). Please see the documentation in QJsonValue::fromVariant() for more information. Note: Conversion from QVariant is not completely lossless. The keys in hash will be used as the keys in the JSON object, and the QVariant values will be converted to JSON values. QJsonObject QJsonObject:: fromVariantHash(const QVariantHash & hash)Ĭonverts the variant hash hash to a QJsonObject. QJsonObject::const_iterator QJsonObject:: find( QLatin1StringView key) const QJsonObject::const_iterator QJsonObject:: find( QStringView key) const QJsonObject::iterator QJsonObject:: find( QLatin1StringView key) QJsonObject::iterator QJsonObject:: find( QStringView key) QJsonObject::const_iterator QJsonObject:: find(const QString & key) const If the map contains no item with key key, the function returns end(). Returns an iterator pointing to the item with key key in the map. QJsonObject::iterator QJsonObject:: find(const QString & key) Removes the (key, value) pair pointed to by the iterator it from the map, and returns an iterator to the next item in the map. QJsonObject::iterator QJsonObject:: erase( QJsonObject::iterator it) QJsonObject::const_iterator QJsonObject:: end() const Returns an STL-style iterator pointing to the imaginary item after the last item in the object. QJsonObject::iterator QJsonObject:: end() It is equivalent to isEmpty(), returning true if the object is empty otherwise returning false. This function is provided for STL compatibility. bool QJsonObject:: contains( QLatin1StringView key) const bool QJsonObject:: contains( QStringView key) const Returns true if the object contains key key. bool QJsonObject:: contains(const QString & key) const QJsonObject::const_iterator QJsonObject:: constFind( QLatin1StringView key) const QJsonObject::const_iterator QJsonObject:: constFind( QStringView key) const If the map contains no item with key key, the function returns constEnd(). Returns a const iterator pointing to the item with key key in the map. QJsonObject::const_iterator QJsonObject:: constFind(const QString & key) const Returns a const STL-style iterator pointing to the imaginary item after the last item in the object. QJsonObject::const_iterator QJsonObject:: constEnd() const Returns a const STL-style iterator pointing to the first item in the object. QJsonObject::const_iterator QJsonObject:: constBegin() const QJsonObject::const_iterator QJsonObject:: begin() const Returns an STL-style iterator pointing to the first item in the object. QJsonObject::iterator QJsonObject:: begin() ![]() QJsonObject:: ~QJsonObject()ĭestroys the object. Move-constructs a QJsonObject from other. QJsonObject:: QJsonObject( QJsonObject & other) Since QJsonObject is implicitly shared, the copy is shallow as long as the object does not get modified. } QJsonObject:: QJsonObject(const QJsonObject & other) Operator=(const QJsonObject & other) const Operator!=(const QJsonObject & other) const Insert(QLatin1StringView key, const QJsonValue & value) Insert(QStringView key, const QJsonValue & value) Insert(const QString & key, const QJsonValue & value)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |