[CXX-1232] Backport 'CXX-1226 Resolve json.cpp compile warnings introduced by deprecation of bson_as_json' for 3.1.2 Created: 27/Feb/17  Updated: 27/Oct/23  Resolved: 23/Mar/17

Status: Closed
Project: C++ Driver
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: J Rassi
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backports CXX-1226 Resolve json.cpp compile warnings int... Closed
Depends
depends on CXX-1056 Add mechanism to disable deprecation ... Closed

 Description   

This ticket tracks the backport of CXX-1226. Original description for CXX-1226:

As of the upcoming 1.7.0 libbson release, bson_as_json() is being deprecated by the introduction of bson_as_extended_json(). See related ticket CDRIVER-1947.

We should disable this deprecation warning via CXX-1056.

Example of the output being generated by this warning:

[2017/02/22 18:53:36.239] /data/mci/b73b54737441c65057f5e95736a1bde9/mongo-cxx-driver/src/bsoncxx/json.cpp:52:19: error: 'bson_as_json' is deprecated [-Werror,-Wdeprecated-declarations]
[2017/02/22 18:53:36.239]     auto result = bson_as_json(&bson, &size);
[2017/02/22 18:53:36.239]                   ^
[2017/02/22 18:53:36.239] /data/mci/b73b54737441c65057f5e95736a1bde9/mongo-cxx-driver/../mongoc/include/libbson-1.0/bson.h:508:1: note: 'bson_as_json' has been explicitly marked deprecated here
[2017/02/22 18:53:36.239] bson_as_json (const bson_t *bson, size_t *length)
[2017/02/22 18:53:36.239] ^
[2017/02/22 18:53:36.268] 1 error generated.



 Comments   
Comment by J Rassi [ 23/Mar/17 ]

As of CDRIVER-2077, bson_as_json() is no longer deprecated in libbson master, so there are no longer any compiler warnings to address. Closing as "Gone away".

Generated at Wed Feb 07 22:01:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.