Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86246

QVariantMap conversion to QJsonDocument behaviour change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15.0
    • Core: Other
    • None

    Description

      a QVariantMap keypair that has value of QVariant is ignored when converting to QJsonDocument.

       

      QVariantMap m{{"toto", QVariant{}}}; 

      qDebug() << m;  // m contains toto with the null QVariant

      qDebug() << QJsonDocument::fromVariant(m); // this one is empty

       

      I was trying to port from Qt 5.12 to 5.15 and that is a real bummer.

       

      Is this behaviour change intended?

      Attachments

        Issue Links

          Activity

            People

              sonakur Sona Kurazyan
              thierryb Thierry Bastian
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: