1{ 2 "description": "Binary type", 3 "bson_type": "0x05", 4 "test_key": "x", 5 "valid": [ 6 { 7 "description": "subtype 0x00 (Zero-length)", 8 "canonical_bson": "0D000000057800000000000000", 9 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"\", \"subType\" : \"00\"}}}" 10 }, 11 { 12 "description": "subtype 0x00 (Zero-length, keys reversed)", 13 "canonical_bson": "0D000000057800000000000000", 14 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"\", \"subType\" : \"00\"}}}", 15 "degenerate_extjson": "{\"x\" : { \"$binary\" : {\"subType\" : \"00\", \"base64\" : \"\"}}}" 16 }, 17 { 18 "description": "subtype 0x00", 19 "canonical_bson": "0F0000000578000200000000FFFF00", 20 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"00\"}}}" 21 }, 22 { 23 "description": "subtype 0x01", 24 "canonical_bson": "0F0000000578000200000001FFFF00", 25 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"01\"}}}" 26 }, 27 { 28 "description": "subtype 0x02", 29 "canonical_bson": "13000000057800060000000202000000FFFF00", 30 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"02\"}}}" 31 }, 32 { 33 "description": "subtype 0x03", 34 "canonical_bson": "1D000000057800100000000373FFD26444B34C6990E8E7D1DFC035D400", 35 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"03\"}}}" 36 }, 37 { 38 "description": "subtype 0x04", 39 "canonical_bson": "1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400", 40 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"04\"}}}" 41 }, 42 { 43 "description": "subtype 0x05", 44 "canonical_bson": "1D000000057800100000000573FFD26444B34C6990E8E7D1DFC035D400", 45 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"05\"}}}" 46 }, 47 { 48 "description": "subtype 0x80", 49 "canonical_bson": "0F0000000578000200000080FFFF00", 50 "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"80\"}}}" 51 }, 52 { 53 "description": "$type query operator (conflicts with legacy $binary form with $type field)", 54 "canonical_bson": "1F000000037800170000000224747970650007000000737472696E67000000", 55 "canonical_extjson": "{\"x\" : { \"$type\" : \"string\"}}" 56 }, 57 { 58 "description": "$type query operator (conflicts with legacy $binary form with $type field)", 59 "canonical_bson": "180000000378001000000010247479706500020000000000", 60 "canonical_extjson": "{\"x\" : { \"$type\" : {\"$numberInt\": \"2\"}}}" 61 } 62 ], 63 "decodeErrors": [ 64 { 65 "description": "Length longer than document", 66 "bson": "1D000000057800FF0000000573FFD26444B34C6990E8E7D1DFC035D400" 67 }, 68 { 69 "description": "Negative length", 70 "bson": "0D000000057800FFFFFFFF0000" 71 }, 72 { 73 "description": "subtype 0x02 length too long ", 74 "bson": "13000000057800060000000203000000FFFF00" 75 }, 76 { 77 "description": "subtype 0x02 length too short", 78 "bson": "13000000057800060000000201000000FFFF00" 79 }, 80 { 81 "description": "subtype 0x02 length negative one", 82 "bson": "130000000578000600000002FFFFFFFFFFFF00" 83 } 84 ] 85} 86