Parsing multiple json data
-
-
[quote author="gandiii" date="1392638439"]
@
{"id":1}
{"id":2}
...
@...
But if I try:
QJsonDocument::fromJson
then object()
I only get the first json element.
[/quote]Sorry, I didn't read your original question and title properly.Since you have multiple JSON documents in your string, I guess you'll have to split them into multiple strings and feed them into multiple QJsonDocuments.
You can detect the start and end of the documents by counting the number of '{' and '}' characters as you iterate through your original string.