diff options
Diffstat (limited to 'src/qjsondocument.cpp')
-rw-r--r-- | src/qjsondocument.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qjsondocument.cpp b/src/qjsondocument.cpp index 3b15b64..a5c39ab 100644 --- a/src/qjsondocument.cpp +++ b/src/qjsondocument.cpp @@ -259,10 +259,11 @@ bool JsonDocument::operator==(const JsonDocument &other) const if (!d || !other.d) return false; + if (d->header->root()->isArray() != other.d->header->root()->isArray()) return false; - if (d->header->root()->isArray()) + if (d->header->root()->isObject()) return JsonObject(d, static_cast<Object *>(d->header->root())) == JsonObject(other.d, static_cast<Object *>(other.d->header->root())); else |