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

QJson accepts invalid escape sequences in strings when parsing JSON files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.13.1
    • Core: Other
    • None

      QJson accepts invalid backslash escapes in strings when parsing Json.

      The attached qmake project demonstrates the problem: It passes a string containing a "\." and QJsonDocument::fromJson(...) accepts that, returning a string containing a fixed string without the "stray" backslash instead.

      ECMA says that a conforming json processor should not do this. The Python Json parser correctly rejects files like these.

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

            laknoll Lars Knoll
            hunger Tobias Hunger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes