path: root/src/corelib/json/qjsondocument.cpp
diff options
Diffstat (limited to 'src/corelib/json/qjsondocument.cpp')
1 files changed, 5 insertions, 7 deletions
diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp
index ee9aa49016..86fd63ead4 100644
--- a/src/corelib/json/qjsondocument.cpp
+++ b/src/corelib/json/qjsondocument.cpp
@@ -359,16 +359,14 @@ QByteArray QJsonDocument::toJson(JsonFormat format) const
- Parses a UTF-8 encoded JSON document and creates a QJsonDocument
+ Parses \a json as a UTF-8 encoded JSON document, and creates a QJsonDocument
from it.
- \a json contains the json document to be parsed.
+ Returns a valid (non-null) QJsonDocument if the parsing succeeds. If it fails,
+ the returned document will be null, and the optional \a error variable will contain
+ further details about the error.
- The optional \a error variable can be used to pass in a QJsonParseError data
- structure that will contain information about possible errors encountered during
- parsing.
- \sa toJson(), QJsonParseError
+ \sa toJson(), QJsonParseError, isNull()
QJsonDocument QJsonDocument::fromJson(const QByteArray &json, QJsonParseError *error)