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

QJsonDocument::fromJson doesn't check the length of the string to see if it has parsed everything

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.3.1
    • Fix Version/s: 5.4.0 Beta
    • Component/s: Core: Other
    • Labels:
      None

      Description

      If you try parsing a malformed Json like this one :

      {key1 : "ok", key2 : {key3: "ok"}}, key4 : "outsideOfMainJsonObject"}

      QJsonDocument will parse :

      {key1 : "ok", key2 : {key3: "ok"}}

      and return without error but in reality the json is malformed

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              laknoll Lars Knoll
              Reporter:
              think-free Christophe
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes