Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-967

JSONSerializer doesn't correctly handle CR characters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1, 2.0.5
    • Fix Version/s: 2.1, 2.0.5
    • Component/s: core-serialization
    • Labels:
      None
    • Environment:
      All, but particularly Windows

      Description

      The JSON standard (see JSON.org) defines specific escape sequences for the following characters: \b, \f, \n, \r, \t and \uxxxx for other control characters. But the encoding logic in JSONSerializer doesn't match this list (particularly missing \r and not encoding other control characters using \uxxxx). The "writeObject" method only recognizes \t and \n and does not encode any control character less than 0xFF. The "readString" method seems a bit weird also in its handling of control characters in the input.

        Attachments

        1. 967.patch
          2 kB
          Roger Whitcomb

          Activity

            People

            • Assignee:
              rwhitcomb Roger Whitcomb
              Reporter:
              rwhitcomb Roger Whitcomb
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: