1
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 0x04 UUID" ,
44
- "canonical_bson" : " 1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400" ,
45
- "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 04\" }}}" ,
46
- "degenerate_extjson" : " {\" x\" : { \" $uuid\" : \" 73ffd264-44b3-4c69-90e8-e7d1dfc035d4\" }}"
47
- },
48
- {
49
- "description" : " subtype 0x05" ,
50
- "canonical_bson" : " 1D000000057800100000000573FFD26444B34C6990E8E7D1DFC035D400" ,
51
- "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 05\" }}}"
52
- },
53
- {
54
- "description" : " subtype 0x07" ,
55
- "canonical_bson" : " 1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400" ,
56
- "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 07\" }}}"
57
- },
58
- {
59
- "description" : " subtype 0x08" ,
60
- "canonical_bson" : " 1D000000057800100000000873FFD26444B34C6990E8E7D1DFC035D400" ,
61
- "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 08\" }}}"
62
- },
63
- {
64
- "description" : " subtype 0x80" ,
65
- "canonical_bson" : " 0F0000000578000200000080FFFF00" ,
66
- "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" //8=\" , \" subType\" : \" 80\" }}}"
67
- },
68
- {
69
- "description" : " $type query operator (conflicts with legacy $binary form with $type field)" ,
70
- "canonical_bson" : " 1F000000037800170000000224747970650007000000737472696E67000000" ,
71
- "canonical_extjson" : " {\" x\" : { \" $type\" : \" string\" }}"
72
- },
73
- {
74
- "description" : " $type query operator (conflicts with legacy $binary form with $type field)" ,
75
- "canonical_bson" : " 180000000378001000000010247479706500020000000000" ,
76
- "canonical_extjson" : " {\" x\" : { \" $type\" : {\" $numberInt\" : \" 2\" }}}"
77
- },
78
- {
79
- "description" : " subtype 0x09 Vector FLOAT32" ,
80
- "canonical_bson" : " 170000000578000A0000000927000000FE420000E04000" ,
81
- "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" JwAAAP5CAADgQA==\" , \" subType\" : \" 09\" }}}"
82
- },
83
- {
84
- "description" : " subtype 0x09 Vector INT8" ,
85
- "canonical_bson" : " 11000000057800040000000903007F0700" ,
86
- "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" AwB/Bw==\" , \" subType\" : \" 09\" }}}"
87
- },
88
- {
89
- "description" : " subtype 0x09 Vector PACKED_BIT" ,
90
- "canonical_bson" : " 11000000057800040000000910007F0700" ,
91
- "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" EAB/Bw==\" , \" subType\" : \" 09\" }}}"
92
- },
93
- {
94
- "description" : " subtype 0x09 Vector (Zero-length) FLOAT32" ,
95
- "canonical_bson" : " 0F0000000578000200000009270000" ,
96
- "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" JwA=\" , \" subType\" : \" 09\" }}}"
97
- },
98
- {
99
- "description" : " subtype 0x09 Vector (Zero-length) INT8" ,
100
- "canonical_bson" : " 0F0000000578000200000009030000" ,
101
- "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" AwA=\" , \" subType\" : \" 09\" }}}"
102
- },
103
- {
104
- "description" : " subtype 0x09 Vector (Zero-length) PACKED_BIT" ,
105
- "canonical_bson" : " 0F0000000578000200000009100000" ,
106
- "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" EAA=\" , \" subType\" : \" 09\" }}}"
107
- }
108
- ],
109
- "decodeErrors" : [
110
- {
111
- "description" : " Length longer than document" ,
112
- "bson" : " 1D000000057800FF0000000573FFD26444B34C6990E8E7D1DFC035D400"
113
- },
114
- {
115
- "description" : " Negative length" ,
116
- "bson" : " 0D000000057800FFFFFFFF0000"
117
- },
118
- {
119
- "description" : " subtype 0x02 length too long " ,
120
- "bson" : " 13000000057800060000000203000000FFFF00"
121
- },
122
- {
123
- "description" : " subtype 0x02 length too short" ,
124
- "bson" : " 13000000057800060000000201000000FFFF00"
125
- },
126
- {
127
- "description" : " subtype 0x02 length negative one" ,
128
- "bson" : " 130000000578000600000002FFFFFFFFFFFF00"
129
- }
130
- ],
131
- "parseErrors" : [
132
- {
133
- "description" : " $uuid wrong type" ,
134
- "string" : " {\" x\" : { \" $uuid\" : { \" data\" : \" 73ffd264-44b3-4c69-90e8-e7d1dfc035d4\" }}}"
135
- },
136
- {
137
- "description" : " $uuid invalid value--too short" ,
138
- "string" : " {\" x\" : { \" $uuid\" : \" 73ffd264-44b3-90e8-e7d1dfc035d4\" }}"
139
- },
140
- {
141
- "description" : " $uuid invalid value--too long" ,
142
- "string" : " {\" x\" : { \" $uuid\" : \" 73ffd264-44b3-4c69-90e8-e7d1dfc035d4-789e4\" }}"
143
- },
144
- {
145
- "description" : " $uuid invalid value--misplaced hyphens" ,
146
- "string" : " {\" x\" : { \" $uuid\" : \" 73ff-d26444b-34c6-990e8e-7d1dfc035d4\" }}"
147
- },
148
- {
149
- "description" : " $uuid invalid value--too many hyphens" ,
150
- "string" : " {\" x\" : { \" $uuid\" : \" ----d264-44b3-4--9-90e8-e7d1dfc0----\" }}"
151
- }
152
- ]
153
- }
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 0x04 UUID" ,
44
+ "canonical_bson" : " 1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400" ,
45
+ "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 04\" }}}" ,
46
+ "degenerate_extjson" : " {\" x\" : { \" $uuid\" : \" 73ffd264-44b3-4c69-90e8-e7d1dfc035d4\" }}"
47
+ },
48
+ {
49
+ "description" : " subtype 0x05" ,
50
+ "canonical_bson" : " 1D000000057800100000000573FFD26444B34C6990E8E7D1DFC035D400" ,
51
+ "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 05\" }}}"
52
+ },
53
+ {
54
+ "description" : " subtype 0x07" ,
55
+ "canonical_bson" : " 1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400" ,
56
+ "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 07\" }}}"
57
+ },
58
+ {
59
+ "description" : " subtype 0x08" ,
60
+ "canonical_bson" : " 1D000000057800100000000873FFD26444B34C6990E8E7D1DFC035D400" ,
61
+ "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" c//SZESzTGmQ6OfR38A11A==\" , \" subType\" : \" 08\" }}}"
62
+ },
63
+ {
64
+ "description" : " subtype 0x80" ,
65
+ "canonical_bson" : " 0F0000000578000200000080FFFF00" ,
66
+ "canonical_extjson" : " {\" x\" : { \" $binary\" : {\" base64\" : \" //8=\" , \" subType\" : \" 80\" }}}"
67
+ },
68
+ {
69
+ "description" : " $type query operator (conflicts with legacy $binary form with $type field)" ,
70
+ "canonical_bson" : " 1F000000037800170000000224747970650007000000737472696E67000000" ,
71
+ "canonical_extjson" : " {\" x\" : { \" $type\" : \" string\" }}"
72
+ },
73
+ {
74
+ "description" : " $type query operator (conflicts with legacy $binary form with $type field)" ,
75
+ "canonical_bson" : " 180000000378001000000010247479706500020000000000" ,
76
+ "canonical_extjson" : " {\" x\" : { \" $type\" : {\" $numberInt\" : \" 2\" }}}"
77
+ },
78
+ {
79
+ "description" : " subtype 0x09 Vector FLOAT32" ,
80
+ "canonical_bson" : " 170000000578000A0000000927000000FE420000E04000" ,
81
+ "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" JwAAAP5CAADgQA==\" , \" subType\" : \" 09\" }}}"
82
+ },
83
+ {
84
+ "description" : " subtype 0x09 Vector INT8" ,
85
+ "canonical_bson" : " 11000000057800040000000903007F0700" ,
86
+ "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" AwB/Bw==\" , \" subType\" : \" 09\" }}}"
87
+ },
88
+ {
89
+ "description" : " subtype 0x09 Vector PACKED_BIT" ,
90
+ "canonical_bson" : " 11000000057800040000000910007F0700" ,
91
+ "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" EAB/Bw==\" , \" subType\" : \" 09\" }}}"
92
+ },
93
+ {
94
+ "description" : " subtype 0x09 Vector (Zero-length) FLOAT32" ,
95
+ "canonical_bson" : " 0F0000000578000200000009270000" ,
96
+ "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" JwA=\" , \" subType\" : \" 09\" }}}"
97
+ },
98
+ {
99
+ "description" : " subtype 0x09 Vector (Zero-length) INT8" ,
100
+ "canonical_bson" : " 0F0000000578000200000009030000" ,
101
+ "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" AwA=\" , \" subType\" : \" 09\" }}}"
102
+ },
103
+ {
104
+ "description" : " subtype 0x09 Vector (Zero-length) PACKED_BIT" ,
105
+ "canonical_bson" : " 0F0000000578000200000009100000" ,
106
+ "canonical_extjson" : " {\" x\" : {\" $binary\" : {\" base64\" : \" EAA=\" , \" subType\" : \" 09\" }}}"
107
+ }
108
+ ],
109
+ "decodeErrors" : [
110
+ {
111
+ "description" : " Length longer than document" ,
112
+ "bson" : " 1D000000057800FF0000000573FFD26444B34C6990E8E7D1DFC035D400"
113
+ },
114
+ {
115
+ "description" : " Negative length" ,
116
+ "bson" : " 0D000000057800FFFFFFFF0000"
117
+ },
118
+ {
119
+ "description" : " subtype 0x02 length too long " ,
120
+ "bson" : " 13000000057800060000000203000000FFFF00"
121
+ },
122
+ {
123
+ "description" : " subtype 0x02 length too short" ,
124
+ "bson" : " 13000000057800060000000201000000FFFF00"
125
+ },
126
+ {
127
+ "description" : " subtype 0x02 length negative one" ,
128
+ "bson" : " 130000000578000600000002FFFFFFFFFFFF00"
129
+ }
130
+ ],
131
+ "parseErrors" : [
132
+ {
133
+ "description" : " $uuid wrong type" ,
134
+ "string" : " {\" x\" : { \" $uuid\" : { \" data\" : \" 73ffd264-44b3-4c69-90e8-e7d1dfc035d4\" }}}"
135
+ },
136
+ {
137
+ "description" : " $uuid invalid value--too short" ,
138
+ "string" : " {\" x\" : { \" $uuid\" : \" 73ffd264-44b3-90e8-e7d1dfc035d4\" }}"
139
+ },
140
+ {
141
+ "description" : " $uuid invalid value--too long" ,
142
+ "string" : " {\" x\" : { \" $uuid\" : \" 73ffd264-44b3-4c69-90e8-e7d1dfc035d4-789e4\" }}"
143
+ },
144
+ {
145
+ "description" : " $uuid invalid value--misplaced hyphens" ,
146
+ "string" : " {\" x\" : { \" $uuid\" : \" 73ff-d26444b-34c6-990e8e-7d1dfc035d4\" }}"
147
+ },
148
+ {
149
+ "description" : " $uuid invalid value--too many hyphens" ,
150
+ "string" : " {\" x\" : { \" $uuid\" : \" ----d264-44b3-4--9-90e8-e7d1dfc0----\" }}"
151
+ }
152
+ ]
153
+ }
0 commit comments