@@ -225,7 +225,7 @@ Use the following code:
225
225
/*
226
226
* Print the document as a JSON string.
227
227
*/
228
- str = bson_as_canonical_json (document, NULL);
228
+ str = bson_as_canonical_extended_json (document, NULL);
229
229
printf ("%s\n", str);
230
230
bson_free (str);
231
231
@@ -284,7 +284,7 @@ Using BCON
284
284
/*
285
285
* Print the document as a JSON string.
286
286
*/
287
- str = bson_as_canonical_json (document, NULL);
287
+ str = bson_as_canonical_extended_json (document, NULL);
288
288
printf ("%s\n", str);
289
289
bson_free (str);
290
290
@@ -322,7 +322,7 @@ For *single* documents, BSON can be created from JSON strings via :doc:`bson_new
322
322
return EXIT_FAILURE;
323
323
}
324
324
325
- string = bson_as_canonical_json (bson, NULL);
325
+ string = bson_as_canonical_extended_json (bson, NULL);
326
326
printf ("%s\n", string);
327
327
bson_free (string);
328
328
@@ -452,7 +452,7 @@ This first example uses an empty query specifier to find all documents in the da
452
452
cursor = mongoc_collection_find_with_opts (collection, query, NULL, NULL);
453
453
454
454
while (mongoc_cursor_next (cursor, &doc)) {
455
- str = bson_as_canonical_json (doc, NULL);
455
+ str = bson_as_canonical_extended_json (doc, NULL);
456
456
printf ("%s\n", str);
457
457
bson_free (str);
458
458
}
@@ -511,7 +511,7 @@ To look for a specific document, add a specifier to ``query``. This example adds
511
511
cursor = mongoc_collection_find_with_opts (collection, query, NULL, NULL);
512
512
513
513
while (mongoc_cursor_next (cursor, &doc)) {
514
- str = bson_as_canonical_json (doc, NULL);
514
+ str = bson_as_canonical_extended_json (doc, NULL);
515
515
printf ("%s\n", str);
516
516
bson_free (str);
517
517
}
@@ -814,7 +814,7 @@ This example executes the `collStats <http://docs.mongodb.org/manual/reference/c
814
814
command = BCON_NEW ("collStats", BCON_UTF8 ("mycoll"));
815
815
if (mongoc_collection_command_simple (
816
816
collection, command, NULL, &reply, &error)) {
817
- str = bson_as_canonical_json (&reply, NULL);
817
+ str = bson_as_canonical_extended_json (&reply, NULL);
818
818
printf ("%s\n", str);
819
819
bson_free (str);
820
820
} else {
0 commit comments