Binary Data of QJsonDocument

  • Hi,
    with the toBinarData() function of the QJsonDocument class, I can save the JSON document as a binary file. Is the binary data a specific format like BSON or UBJSON?

    The doc says only:

    It also contains support for saving this data in a binary format that is directly "mmap"-able and very fast to access.


  • Nothing of the sort. toBinarData() just stores the QJsonDocument as it is internally managed by the class. The maintainer of Qt Core advises not to use that method as it will soon be deprecated (source). Stick to toJson()

  • @VRonin

Log in to reply