Unsolved QJsonObject validation?
-
I can see in documentation for QJsonObject:
https://doc.qt.io/qt-5/qjsondocument.html
That there is an enum called DataValidation, but I don't see an isValid or anything similar. How do I validate a QJsonObject instance? -
And again a question which is faster answered by simply looking at the documentation than writing a post here...
-
@Christian-Ehrlicher , obviously not since I referenced the same documentation in my post and didn't find an answer.
-
@SPlatten This enum is not used for any isValid() (which by the way would return a boolean), but for something else (what exactly is stated clearly in the documentation).
-
@jsulm , I wasn't questioning the purpose of what is in the documentation, my original question was is there a way to determine if the content of QJsonObject is valid?
However never mind, I've since resolved the issue.
-
A QJsonObject has a function isEmpty(). Everything else can not be validated in an QJsonObject (how should it be)
-
@SPlatten said in QJsonObject validation?:
I've since resolved the issue
Two things here, please:
- share how you solved the issue (for the benefit of other users of the forum)
- don't forget to mark your post as solved!
-
@SPlatten
If it's in aQJsonObject
it's valid, else it wouldn't get there (from text).