[CDRIVER-4533] Docs for bson_new_from_json and bson_init_from_json incorrectly state that input requires a single JSON object Created: 05/Dec/22  Updated: 28/Oct/23  Resolved: 17/Jul/23

Status: Closed
Project: C Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: 1.24.1

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Adrian Dole
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-1332 Does bson_json_reader_new's allow_mul... Closed

 Description   

Docs for bson_new_from_json and bson_init_from_json state:

Only a single JSON object may exist in data or an error will be set and NULL returned.

These functions both utilize bson_json_reader_new. Docs for bson_json_reader_new and bson_json_data_reader_new correctly state that the allow_multiple parameter is unused (see: CDRIVER-1332).



 Comments   
Comment by Githook User [ 28/Jun/23 ]

Author:

{'name': 'Adrian Dole', 'email': 'adrian@dole.tech', 'username': 'adriandole'}

Message: CDRIVER-4533 Document and test behavior of bson_new_from_json with multiple JSONs (#1310)

  • bson_new_from_json documentation with multiple JSONs
  • Tests
  • Apply suggestions from code review

Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>

  • Mark current behavior as deprecated
  • test simplifications
  • Apply suggestions from code review

Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com>

  • Newline

---------

Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/39f56c4b01c3f98a5d28f76a8dcbd76938819d33

Generated at Wed Feb 07 21:21:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.