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. Binary Data of QJsonDocument

Binary Data of QJsonDocument

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 799 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.
  • beeckscheB Offline
    beeckscheB Offline
    beecksche
    wrote on last edited by beecksche
    #1

    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.

    Thanks

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      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()

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      beeckscheB 1 Reply Last reply
      3
      • VRoninV VRonin

        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()

        beeckscheB Offline
        beeckscheB Offline
        beecksche
        wrote on last edited by
        #3

        @VRonin
        Thanks!

        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