• nous@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    Never said it had to be a text file. There are many binary serialization formats that could be used. But is a lot of situations the overhead you save is not worth the debugging effort of working with binary data. For something like this that is likely not going to be more then a GB or so, probably much less it really does not matter that much if you use binary or text formats. This is an export format that will likely just have one batch processing layer on. This type of thing is generally easiest for more people to work with in a plain text format. If you really need efficient querying of the data then it is trivial and quick to load it into a DB of your choice rather then being stuck with sqlite.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 day ago

      As long as it is something I want to be loading all at once, I would go with JSON and use the JSON binary format provided by QJsonDocument and forget about it.
      But if I expect it to get bigger and need stuff partially loaded, things get lengthier.
      Stream Reading libraries (e.g. the XML one in Qt) makes it much longer to write and that’s where I would consider whether to use a database instead.