Solved QJson: Document too large to store in data structure
-
Hello,
I've been using QJson library for reading and writing data into JSON files. The different forums clear state that the size limit to write into a JSON file is 127/128 MB and it will "QJson: Document too large to store in data structurethrow " runtime exception.
From what I've observed that it has started throwing error even at 97MB, 120MB, even miraculously at 178MB. I am not sure with this behavior. I've checked that the application has enough RAM to execute data.
Please can anyone enlighten me on this behavior and may be point out to places where I can be sure that the JSON library in QT has a memory limitation for reading and writing. -
@Uday-More You should ask such questions on Qt mailing list where you find Qt developers who know Qt internals better. Here is user forum. As alternative you could study Qt source code (for example searching for "QJson: Document too large to store in data structure").
I'm wondering what the usecase is for such huge Json documents? -
Hi
Well you can inspect the source to see where it would say it.
https://code.woboq.org/qt5/qtbase/src/corelib/serialization/qjson_p.h.html#719
https://code.woboq.org/qt5/qtbase/src/corelib/serialization/qjson.cpp.html#143 -
@jsulm : Thanks for the reply. Will surely keep in mind to post such questions in QT mailing list. :)