Description
Unfortunately a new number formatting similar to issue: https://jira.mongodb.org/browse/CDRIVER-652. The bson_as_json function prints many insignificant digits for doubles:
> con <- mongo()
|
> con$insert('{"test": 3.9}')
|
> con$export()
|
{ "_id" : { "$oid" : "5ad088a5ba7cb20ff97e6a54" }, "test" : 3.8999999999999999112 }
|
OTOH, the mongo command line utility prints the correct number of digits for the same data:
> db.test.find()
|
{ "_id" : ObjectId("5ad088a5ba7cb20ff97e6a54"), "test" : 3.9 }
|