File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2717,7 +2717,7 @@ _bson_as_json_visit_binary (const bson_iter_t *iter,
2717
2717
2718
2718
if (state -> mode == BSON_JSON_MODE_CANONICAL ||
2719
2719
state -> mode == BSON_JSON_MODE_RELAXED ) {
2720
- bson_string_append (state -> str , "{ \"$binary\" : { \"base64\": \"" );
2720
+ bson_string_append (state -> str , "{ \"$binary\" : { \"base64\" : \"" );
2721
2721
bson_string_append (state -> str , b64 );
2722
2722
bson_string_append (state -> str , "\", \"subType\" : \"" );
2723
2723
bson_string_append_printf (state -> str , "%02x" , v_subtype );
Original file line number Diff line number Diff line change @@ -2471,7 +2471,7 @@ test_bson_as_json_string (void)
2471
2471
const char * expected =
2472
2472
"{ \"double\" : { \"$numberDouble\" : \"1.0\" }, \"string\" : "
2473
2473
"\"string_example\", \"document\" : { \"x\" : \"y\" }, \"document\" : [ "
2474
- "\"x\" ], \"binary\" : { \"$binary\" : { \"base64\": \"ZGF0YQ==\", "
2474
+ "\"x\" ], \"binary\" : { \"$binary\" : { \"base64\" : \"ZGF0YQ==\", "
2475
2475
"\"subType\" : \"00\" } }, \"undefined\" : { \"$undefined\" : true }, "
2476
2476
"\"oid\" : { \"$oid\" : \"000000000000000000000000\" }, \"bool\" : true, "
2477
2477
"\"datetime\" : { \"$date\" : { \"$numberLong\" : \"123\" } }, \"null\" "
Original file line number Diff line number Diff line change @@ -2976,12 +2976,12 @@ test_bson_as_json_with_opts_binary (void)
2976
2976
2977
2977
run_bson_as_json_with_opts_tests (b ,
2978
2978
BSON_JSON_MODE_CANONICAL ,
2979
- "{ \"v\" : { \"$binary\" : { \"base64\": "
2979
+ "{ \"v\" : { \"$binary\" : { \"base64\" : "
2980
2980
"\"AQIDBA==\", \"subType\" : \"00\" } } }" );
2981
2981
2982
2982
run_bson_as_json_with_opts_tests (b ,
2983
2983
BSON_JSON_MODE_RELAXED ,
2984
- "{ \"v\" : { \"$binary\" : { \"base64\": "
2984
+ "{ \"v\" : { \"$binary\" : { \"base64\" : "
2985
2985
"\"AQIDBA==\", \"subType\" : \"00\" } } }" );
2986
2986
2987
2987
bson_destroy (b );
You can’t perform that action at this time.
0 commit comments