-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.13.0
-
Component/s: libbson
-
None
Example code:
#include <bson.h> #include <stdio.h> int main() { bson_t b = BSON_INITIALIZER; BSON_APPEND_DOUBLE (&b, "a", 3399.99); size_t len; char *str; str = bson_as_json (&b, &len); printf ("%s\n", str); bson_free (str); return 0; }
Actual output:
{ "a" : 3399.9899999999997817}
Expected output:
{ "a" : 3399.99}
- is related to
-
CDRIVER-1945 bson_as_json outputs doubles as integers
- Closed
-
CDRIVER-652 Number formatting and whitespace in bson_as_json
- Closed
- related to
-
CDRIVER-4819 Allow reducing precision when converting BSON double values to JSON
- Backlog