Skip to content

Commit f41aec5

Browse files
committed
CDRIVER-2239 Rename bson_as_[canonical|relaxed]_json() to bson_as_[canonical|relaxed]_extended_json()
1 parent df56c5d commit f41aec5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+75
-78
lines changed

doc/cursors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ While iterating cursors, you should check to see if an error has occurred. See t
2424
cursor = mongoc_collection_find_with_opts (collection, query, NULL, NULL);
2525
2626
while (mongoc_cursor_next (cursor, &doc)) {
27-
str = bson_as_canonical_json (doc, NULL);
27+
str = bson_as_canonical_extended_json (doc, NULL);
2828
printf ("%s\n", str);
2929
bson_free (str);
3030
}

doc/mongoc_collection_command_simple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The following is an example of executing the collection stats command.
6767
6868
if (mongoc_collection_command_simple (
6969
collection, cmd, NULL, &reply, &error)) {
70-
str = bson_as_canonical_json (&reply, NULL);
70+
str = bson_as_canonical_extended_json (&reply, NULL);
7171
printf ("%s\n", str);
7272
bson_free (str);
7373
} else {

doc/mongoc_collection_find.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Example
8383
collection, MONGOC_QUERY_NONE, 0, 0, 0, query, NULL, NULL);
8484
8585
while (mongoc_cursor_next (cursor, &doc)) {
86-
str = bson_as_canonical_json (doc, NULL);
86+
str = bson_as_canonical_extended_json (doc, NULL);
8787
printf ("%s\n", str);
8888
bson_free (str);
8989
}

doc/mongoc_collection_find_with_opts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Examples
6262
cursor = mongoc_collection_find_with_opts (collection, filter, opts, NULL);
6363
6464
while (mongoc_cursor_next (cursor, &doc)) {
65-
str = bson_as_canonical_json (doc, NULL);
65+
str = bson_as_canonical_extended_json (doc, NULL);
6666
printf ("%s\n", str);
6767
bson_free (str);
6868
}

doc/mongoc_matcher_t.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Example
7676
7777
while ((bson = bson_reader_read (reader, NULL))) {
7878
if (mongoc_matcher_match (matcher, bson)) {
79-
str = bson_as_canonical_json (bson, NULL);
79+
str = bson_as_canonical_extended_json (bson, NULL);
8080
printf ("%s\n", str);
8181
bson_free (str);
8282
}

doc/mongoc_read_prefs_set_tags.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Examples
6262
mongoc_collection_find_with_opts (collection, &filter, NULL, read_prefs);
6363
6464
while (mongoc_cursor_next (cursor, &doc)) {
65-
str = bson_as_canonical_json (doc, NULL);
65+
str = bson_as_canonical_extended_json (doc, NULL);
6666
printf ("%s\n", str);
6767
bson_free (str);
6868
}

doc/mongoc_uri_get_mechanism_properties.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Example
4141
"&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true");
4242
4343
if (mongoc_uri_get_mechanism_properties (uri, &props)) {
44-
char *json = bson_as_canonical_json (&props, NULL);
44+
char *json = bson_as_canonical_extended_json (&props, NULL);
4545
printf ("%s\n", json);
4646
bson_free (json);
4747
} else {

doc/tutorial.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {

examples/aggregation/aggregation1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ print_pipeline (mongoc_collection_t *collection)
4040
collection, MONGOC_QUERY_NONE, pipeline, NULL, NULL);
4141

4242
while (mongoc_cursor_next (cursor, &doc)) {
43-
str = bson_as_canonical_json (doc, NULL);
43+
str = bson_as_canonical_extended_json (doc, NULL);
4444
printf ("%s\n", str);
4545
bson_free (str);
4646
}

examples/bulk/bulk-collation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ bulk_collation (mongoc_collection_t *collection)
4242

4343
ret = mongoc_bulk_operation_execute (bulk, &reply, &error);
4444

45-
str = bson_as_canonical_json (&reply, NULL);
45+
str = bson_as_canonical_extended_json (&reply, NULL);
4646
printf ("%s\n", str);
4747
bson_free (str);
4848

0 commit comments

Comments
 (0)