You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Vinod Kone (JIRA)" <ji...@apache.org> on 2015/08/15 02:11:45 UTC

[jira] [Updated] (MESOS-3267) JSON serialization/deserialization of bytes is incorrect

     [ https://issues.apache.org/jira/browse/MESOS-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinod Kone updated MESOS-3267:
------------------------------
    Target Version/s: 0.24.0
       Fix Version/s: 0.24.0

> JSON serialization/deserialization of bytes is incorrect
> --------------------------------------------------------
>
>                 Key: MESOS-3267
>                 URL: https://issues.apache.org/jira/browse/MESOS-3267
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Vinod Kone
>            Assignee: Vinod Kone
>             Fix For: 0.24.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)