Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QJson: Document too large to store in data structure
Forum Updated to NodeBB v4.3 + New Features

QJson: Document too large to store in data structure

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Uday More
    wrote on last edited by
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • U Uday More

      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.

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      U 1 Reply Last reply
      4
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        5
        • jsulmJ jsulm

          @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?

          U Offline
          U Offline
          Uday More
          wrote on last edited by Uday More
          #4

          @jsulm : Thanks for the reply. Will surely keep in mind to post such questions in QT mailing list. :)

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved