You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Joseph Wu (JIRA)" <ji...@apache.org> on 2015/08/31 23:56:46 UTC
[jira] [Created] (MESOS-3345) Expand the range of integer precision
when converting into/out of json.
Joseph Wu created MESOS-3345:
--------------------------------
Summary: Expand the range of integer precision when converting into/out of json.
Key: MESOS-3345
URL: https://issues.apache.org/jira/browse/MESOS-3345
Project: Mesos
Issue Type: Task
Components: stout
Reporter: Joseph Wu
Assignee: Joseph Wu
Priority: Minor
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:
1) Try using a {{long double}} to represent a number.
2) Add logic to stringify/parse numbers without loss when possible.
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)