diff --git a/src/mongocrypt-opts.c b/src/mongocrypt-opts.c index dc6680aa0..7f8236224 100644 --- a/src/mongocrypt-opts.c +++ b/src/mongocrypt-opts.c @@ -990,7 +990,7 @@ bool _mongocrypt_parse_kms_providers(mongocrypt_binary_t *kms_providers_definiti } if (log && log->trace_enabled) { - char *as_str = bson_as_json(&as_bson, NULL); + char *as_str = bson_as_relaxed_extended_json(&as_bson, NULL); _mongocrypt_log(log, MONGOCRYPT_LOG_LEVEL_TRACE, "%s (%s=\"%s\")", BSON_FUNC, "kms_providers", as_str); bson_free(as_str); } diff --git a/test/example-state-machine.c b/test/example-state-machine.c index 3de46d962..6ede0d80e 100644 --- a/test/example-state-machine.c +++ b/test/example-state-machine.c @@ -108,7 +108,7 @@ static void _print_binary_as_bson(mongocrypt_binary_t *binary) { BSON_ASSERT(binary); bson_init_static(&as_bson, mongocrypt_binary_data(binary), mongocrypt_binary_len(binary)); - str = bson_as_json(&as_bson, NULL); + str = bson_as_relaxed_extended_json(&as_bson, NULL); printf("%s\n", str); bson_free(str); } diff --git a/test/test-mongocrypt-assert-match-bson.h b/test/test-mongocrypt-assert-match-bson.h index 12bfb81c2..4db8856b6 100644 --- a/test/test-mongocrypt-assert-match-bson.h +++ b/test/test-mongocrypt-assert-match-bson.h @@ -26,8 +26,8 @@ bool _check_match_bson(const bson_t *doc, const bson_t *pattern, char *errmsg, s if (1) { \ char errmsg[1024] = ""; \ if (!_check_match_bson(doc, pattern, errmsg, sizeof(errmsg))) { \ - char *doc_str = bson_as_json(doc, NULL); \ - char *pattern_str = bson_as_json(pattern, NULL); \ + char *doc_str = bson_as_relaxed_extended_json(doc, NULL); \ + char *pattern_str = bson_as_relaxed_extended_json(pattern, NULL); \ \ TEST_ERROR("ASSERT_MATCH failed with document:\n\n" \ "%s\n" \ diff --git a/test/test-mongocrypt-kek.c b/test/test-mongocrypt-kek.c index 36e28aaec..8c827a930 100644 --- a/test/test-mongocrypt-kek.c +++ b/test/test-mongocrypt-kek.c @@ -45,7 +45,7 @@ static void _run_one_test(_mongocrypt_tester_t *tester, bson_t *test) { expect_append = expect; } - input_str = bson_as_json(&input, NULL); + input_str = bson_as_relaxed_extended_json(&input, NULL); printf("- testcase: %s\n", input_str); bson_free(input_str); @@ -98,4 +98,4 @@ void test_mongocrypt_kek_parsing(_mongocrypt_tester_t *tester) { void _mongocrypt_tester_install_kek(_mongocrypt_tester_t *tester) { INSTALL_TEST(test_mongocrypt_kek_parsing); -} \ No newline at end of file +} diff --git a/test/test-mongocrypt-key-cache.c b/test/test-mongocrypt-key-cache.c index f9c832521..668ab4ec7 100644 --- a/test/test-mongocrypt-key-cache.c +++ b/test/test-mongocrypt-key-cache.c @@ -268,7 +268,7 @@ static void _match_cache_entry(_mongocrypt_tester_t *tester, mongocrypt_ctx_t *c while (pair) { if (_match_one_cache_entry(pair, expected_entry)) { if (matched) { - printf("double matched entry: %s\n", bson_as_json(expected_entry, NULL)); + printf("double matched entry: %s\n", bson_as_relaxed_extended_json(expected_entry, NULL)); BSON_ASSERT(false); } matched = true; @@ -278,7 +278,7 @@ static void _match_cache_entry(_mongocrypt_tester_t *tester, mongocrypt_ctx_t *c } if (!matched) { - printf("could not match entry: %s\n", bson_as_json(expected_entry, NULL)); + printf("could not match entry: %s\n", bson_as_relaxed_extended_json(expected_entry, NULL)); BSON_ASSERT(false); } } @@ -419,4 +419,4 @@ static void _test_key_cache(_mongocrypt_tester_t *tester) { void _mongocrypt_tester_install_key_cache(_mongocrypt_tester_t *tester) { INSTALL_TEST(_test_key_cache); -} \ No newline at end of file +}