Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-3267

JSON serialization/deserialization of bytes is incorrect

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.24.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Sprint:
      Twitter Mesos Q3 Sprint 3
    • Story Points:
      2

      Description

      Currently, we use our own serialization of bytes in json.hpp but we use picojson for deserialization.

      We've observed that for some bytes the serialization results in a string that is incorrectly decoded by picojson.

      Example:

      String = ""\"\\/\b\f\n\r\t\x00\x19 !#[]\x7F\xFF"

      Result of our own encoding: "\"\\\"\\\\\\/\\b\\f\\n\\r\\t\\u0000
      u0019 !#[]\\u007f\xFF\""

      picojson's encoding: "\"\\\"\\\\\\/\\b\\f\\n\\r\\t\\u0000
      u0019 !#[]\\u007F\\u00FF\""

      Fix:
      We just use picojson to serialize bytes for consistency.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vinodkone Vinod Kone
                Reporter:
                vinodkone Vinod Kone
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: