Esempio n. 1
0
/*!
    Returns \c true if the document contains an object.

    \sa object(), isArray()
 */
bool QJsonDocument::isObject() const
{
    if (!d)
        return false;

    QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData;
    return h->root()->isObject();
}
Esempio n. 2
0
/*!
    Returns true if the document contains an array.

    \sa array(), isObject()
 */
bool QJsonDocument::isArray() const
{
   if (!d) {
      return false;
   }

   QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData;
   return h->root()->isArray();
}