We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0460cf2 commit 905fbdaCopy full SHA for 905fbda
source/includes/write/gridfs.c
@@ -16,7 +16,8 @@ main (void)
16
mongoc_database_t *db = mongoc_client_get_database (client, "db");
17
18
bson_error_t error;
19
- if (!mongoc_gridfs_bucket_new (db, NULL, NULL, &error)) {
+ mongoc_gridfs_bucket_t *bucket = mongoc_gridfs_bucket_new (db, NULL, NULL, &error);
20
+ if (!bucket) {
21
fprintf (stderr, "Failed to create bucket: %s\n", error.message);
22
}
23
// end-create-bucket
@@ -75,7 +76,7 @@ main (void)
75
76
const bson_t *file_doc;
77
78
while (mongoc_cursor_next(cursor, &file_doc)) {
- char *json = bson_as_json(file_doc, NULL);
79
+ char *json = bson_as_relaxed_extended_json(file_doc, NULL);
80
printf("%s\n", json);
81
bson_free(json);
82
0 commit comments