The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
{
    "description": "Document type (sub-documents)",
    "bson_type": "0x03",
    "test_key": "x",
    "valid": [
        {
            "description": "Empty subdoc",
            "bson": "0D000000037800050000000000",
            "extjson": "{\"x\" : {}}"
        },
        {
            "description": "Empty-string key subdoc",
            "bson": "150000000378000D00000002000200000062000000",
            "extjson": "{\"x\" : {\"\" : \"b\"}}"
        },
        {
            "description": "Single-character key subdoc",
            "bson": "160000000378000E0000000261000200000062000000",
            "extjson": "{\"x\" : {\"a\" : \"b\"}}"
        }
    ],
    "decodeErrors": [
        {
            "description": "Subdocument length too long: eats outer terminator",
            "bson": "1800000003666F6F000F0000001062617200FFFFFF7F0000"
        },
        {
            "description": "Subdocument length too short: leaks terminator",
            "bson": "1500000003666F6F000A0000000862617200010000"
        },
        {
            "description": "Invalid subdocument: bad string length in field",
            "bson": "1C00000003666F6F001200000002626172000500000062617A000000"
        }
    ]
}