-
Type: Bug
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Float are encoded as BSON "$numberDouble" with an incorrect value.
echo MongoDB\BSON\Document::fromPHP(['x' => 1.99])->toCanonicalExtendedJSON(); // Actual // { "x" : { "$numberDouble" : "1.9899999999999999911" } } // Expected // { "x" : { "$numberDouble" : "1.99" } }
- depends on
-
CDRIVER-4819 Allow reducing precision when converting BSON double values to JSON
- Backlog