@@ -225,7 +225,7 @@ Use the following code:
225225 /*
226226 * Print the document as a JSON string.
227227 */
228- str = bson_as_canonical_json (document, NULL);
228+ str = bson_as_canonical_extended_json (document, NULL);
229229 printf ("%s\n", str);
230230 bson_free (str);
231231
@@ -284,7 +284,7 @@ Using BCON
284284 /*
285285 * Print the document as a JSON string.
286286 */
287- str = bson_as_canonical_json (document, NULL);
287+ str = bson_as_canonical_extended_json (document, NULL);
288288 printf ("%s\n", str);
289289 bson_free (str);
290290
@@ -322,7 +322,7 @@ For *single* documents, BSON can be created from JSON strings via :doc:`bson_new
322322 return EXIT_FAILURE;
323323 }
324324
325- string = bson_as_canonical_json (bson, NULL);
325+ string = bson_as_canonical_extended_json (bson, NULL);
326326 printf ("%s\n", string);
327327 bson_free (string);
328328
@@ -452,7 +452,7 @@ This first example uses an empty query specifier to find all documents in the da
452452 cursor = mongoc_collection_find_with_opts (collection, query, NULL, NULL);
453453
454454 while (mongoc_cursor_next (cursor, &doc)) {
455- str = bson_as_canonical_json (doc, NULL);
455+ str = bson_as_canonical_extended_json (doc, NULL);
456456 printf ("%s\n", str);
457457 bson_free (str);
458458 }
@@ -511,7 +511,7 @@ To look for a specific document, add a specifier to ``query``. This example adds
511511 cursor = mongoc_collection_find_with_opts (collection, query, NULL, NULL);
512512
513513 while (mongoc_cursor_next (cursor, &doc)) {
514- str = bson_as_canonical_json (doc, NULL);
514+ str = bson_as_canonical_extended_json (doc, NULL);
515515 printf ("%s\n", str);
516516 bson_free (str);
517517 }
@@ -814,7 +814,7 @@ This example executes the `collStats <http://docs.mongodb.org/manual/reference/c
814814 command = BCON_NEW ("collStats", BCON_UTF8 ("mycoll"));
815815 if (mongoc_collection_command_simple (
816816 collection, command, NULL, &reply, &error)) {
817- str = bson_as_canonical_json (&reply, NULL);
817+ str = bson_as_canonical_extended_json (&reply, NULL);
818818 printf ("%s\n", str);
819819 bson_free (str);
820820 } else {
0 commit comments