[CXX-1753] bsoncxx:to_json causes double value to truncate Created: 29/Mar/19 Updated: 27/Oct/23 Resolved: 02/Apr/19 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | BSON |
| Affects Version/s: | 3.0.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Andrew Skripnikov | Assignee: | Unassigned |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | bson | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
ubuntu.16-04 |
||
| Description |
|
When I'm using bsoncxx::to_json function to convert prepared bsoncxx document to json all float/double values are truncated to 5 digits precision. Please check following code:
Sample output:
I'm expecting following output from to_json call:
How to fix this issue? libbsoncxx -> 3.0.1 libbson -> 1.9.2 Thank you! |
| Comments |
| Comment by Kevin Albertson [ 02/Apr/19 ] |
|
screep glad to hear! Closing. |
| Comment by Andrew Skripnikov [ 02/Apr/19 ] |
|
No. After upgrade to 3.4.0 everything is fine. Thank you! { "T1" : 1.0123456789000000455 } { "T2" : 9.876543211099999553 } V1: 1.0123456789
|
| Comment by Kevin Albertson [ 01/Apr/19 ] |
|
Hi screep, thanks for reporting this. If possible, are you able to reproduce this on the latest released C++ driver, 3.4.0? |