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

QJsonDocument::fromVariant ignored null values

    XMLWordPrintable

    Details

    • Platform/s:
      All
    • Commits:
      cb1c66bd204c12d848f47de6411d31edbafaf008 (qt/qtbase/dev) b6d7b0ede59b52974baf53c805caecbb300ad90b (qt/qtbase/5.15)

      Description

          QVariantMap variantMap;
          variantMap.insert("A", "1");
          variantMap.insert("B", QVariant());
          qDebug().noquote() << QJsonDocument::fromVariant(variantMap).toJson(QJsonDocument::Compact);
      
          // Qt 5.14.2 output: {"A":"1","B":null}
          // Qt 5.15.0 output: {"A":"1"}
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              thiago Thiago Macieira
              Reporter:
              ighor IGHOR
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes