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

Expand the range of integer precision when converting into/out of json.

    Details

    • Target Version/s:
    • Sprint:
      Mesosphere Sprint 18, Mesosphere Sprint 19
    • Story Points:
      5

      Description

      For MESOS-3299, we added some protobufs to represent time with integer precision. However, this precision is not maintained through protobuf <-> JSON conversion, because of how our JSON encoders/decoders convert numbers to floating point.

      To maintain precision, we can try one of the following:

      • Try using a long double to represent a number.
      • Add logic to stringify/parse numbers without loss when possible.
      • Try representing int64_t as a string and parse it as such?
      • Update PicoJson and add a compiler flag, i.e. -DPICOJSON_USE_INT64

      In all cases, we'll need to make sure that:

      • Integers are properly stringified without loss.
      • The JSON decoder parses the integer without loss.
      • We have some unit tests for big (close to INT32_MAX/INT64_MAX) and small integers.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kaysoky Joseph Wu
                Reporter:
                kaysoky Joseph Wu
                Shepherd:
                Joris Van Remoortere
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: