...
1{
2 "description": "Document type (sub-documents)",
3 "bson_type": "0x03",
4 "test_key": "x",
5 "valid": [
6 {
7 "description": "Empty subdoc",
8 "canonical_bson": "0D000000037800050000000000",
9 "canonical_extjson": "{\"x\" : {}}"
10 },
11 {
12 "description": "Empty-string key subdoc",
13 "canonical_bson": "150000000378000D00000002000200000062000000",
14 "canonical_extjson": "{\"x\" : {\"\" : \"b\"}}"
15 },
16 {
17 "description": "Single-character key subdoc",
18 "canonical_bson": "160000000378000E0000000261000200000062000000",
19 "canonical_extjson": "{\"x\" : {\"a\" : \"b\"}}"
20 },
21 {
22 "description": "Dollar-prefixed key in sub-document",
23 "canonical_bson": "170000000378000F000000022461000200000062000000",
24 "canonical_extjson": "{\"x\" : {\"$a\" : \"b\"}}"
25 },
26 {
27 "description": "Dollar as key in sub-document",
28 "canonical_bson": "160000000378000E0000000224000200000061000000",
29 "canonical_extjson": "{\"x\" : {\"$\" : \"a\"}}"
30 },
31 {
32 "description": "Dotted key in sub-document",
33 "canonical_bson": "180000000378001000000002612E62000200000063000000",
34 "canonical_extjson": "{\"x\" : {\"a.b\" : \"c\"}}"
35 },
36 {
37 "description": "Dot as key in sub-document",
38 "canonical_bson": "160000000378000E000000022E000200000061000000",
39 "canonical_extjson": "{\"x\" : {\".\" : \"a\"}}"
40 }
41 ],
42 "decodeErrors": [
43 {
44 "description": "Subdocument length too long: eats outer terminator",
45 "bson": "1800000003666F6F000F0000001062617200FFFFFF7F0000"
46 },
47 {
48 "description": "Subdocument length too short: leaks terminator",
49 "bson": "1500000003666F6F000A0000000862617200010000"
50 },
51 {
52 "description": "Invalid subdocument: bad string length in field",
53 "bson": "1C00000003666F6F001200000002626172000500000062617A000000"
54 },
55 {
56 "description": "Null byte in sub-document key",
57 "bson": "150000000378000D00000010610000010000000000"
58 }
59 ]
60}
View as plain text