| 1 |
{ |
| 2 |
"description": "Double type", |
| 3 |
"bson_type": "0x01", |
| 4 |
"test_key": "d", |
| 5 |
"valid": [ |
| 6 |
{ |
| 7 |
"description": "+1.0", |
| 8 |
"canonical_bson": "10000000016400000000000000F03F00", |
| 9 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.0\"}}", |
| 10 |
"relaxed_extjson": "{\"d\" : 1.0}" |
| 11 |
}, |
| 12 |
{ |
| 13 |
"description": "-1.0", |
| 14 |
"canonical_bson": "10000000016400000000000000F0BF00", |
| 15 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.0\"}}", |
| 16 |
"relaxed_extjson": "{\"d\" : -1.0}" |
| 17 |
}, |
| 18 |
{ |
| 19 |
"description": "+1.0001220703125", |
| 20 |
"canonical_bson": "10000000016400000000008000F03F00", |
| 21 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.0001220703125\"}}", |
| 22 |
"relaxed_extjson": "{\"d\" : 1.0001220703125}" |
| 23 |
}, |
| 24 |
{ |
| 25 |
"description": "-1.0001220703125", |
| 26 |
"canonical_bson": "10000000016400000000008000F0BF00", |
| 27 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.0001220703125\"}}", |
| 28 |
"relaxed_extjson": "{\"d\" : -1.0001220703125}" |
| 29 |
}, |
| 30 |
{ |
| 31 |
"description": "1.2345678921232E+18", |
| 32 |
"canonical_bson": "100000000164002a1bf5f41022b14300", |
| 33 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.2345678921232E+18\"}}", |
| 34 |
"relaxed_extjson": "{\"d\" : 1.2345678921232E+18}" |
| 35 |
}, |
| 36 |
{ |
| 37 |
"description": "-1.2345678921232E+18", |
| 38 |
"canonical_bson": "100000000164002a1bf5f41022b1c300", |
| 39 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.2345678921232E+18\"}}", |
| 40 |
"relaxed_extjson": "{\"d\" : -1.2345678921232E+18}" |
| 41 |
}, |
| 42 |
{ |
| 43 |
"description": "0.0", |
| 44 |
"canonical_bson": "10000000016400000000000000000000", |
| 45 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"0.0\"}}", |
| 46 |
"relaxed_extjson": "{\"d\" : 0.0}" |
| 47 |
}, |
| 48 |
{ |
| 49 |
"description": "-0.0", |
| 50 |
"canonical_bson": "10000000016400000000000000008000", |
| 51 |
"canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-0.0\"}}", |
| 52 |
"relaxed_extjson": "{\"d\" : -0.0}" |
| 53 |
}, |
| 54 |
{ |
| 55 |
"description": "NaN", |
| 56 |
"canonical_bson": "10000000016400000000000000F87F00", |
| 57 |
"canonical_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", |
| 58 |
"relaxed_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", |
| 59 |
"lossy": true |
| 60 |
}, |
| 61 |
{ |
| 62 |
"description": "NaN with payload", |
| 63 |
"canonical_bson": "10000000016400120000000000F87F00", |
| 64 |
"canonical_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", |
| 65 |
"relaxed_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", |
| 66 |
"lossy": true |
| 67 |
}, |
| 68 |
{ |
| 69 |
"description": "Inf", |
| 70 |
"canonical_bson": "10000000016400000000000000F07F00", |
| 71 |
"canonical_extjson": "{\"d\": {\"$numberDouble\": \"Infinity\"}}", |
| 72 |
"relaxed_extjson": "{\"d\": {\"$numberDouble\": \"Infinity\"}}" |
| 73 |
}, |
| 74 |
{ |
| 75 |
"description": "-Inf", |
| 76 |
"canonical_bson": "10000000016400000000000000F0FF00", |
| 77 |
"canonical_extjson": "{\"d\": {\"$numberDouble\": \"-Infinity\"}}", |
| 78 |
"relaxed_extjson": "{\"d\": {\"$numberDouble\": \"-Infinity\"}}" |
| 79 |
} |
| 80 |
], |
| 81 |
"decodeErrors": [ |
| 82 |
{ |
| 83 |
"description": "double truncated", |
| 84 |
"bson": "0B0000000164000000F03F00" |
| 85 |
} |
| 86 |
] |
| 87 |
} |