[CXX-1880] bsoncxx::element::array does not expose key() function Created: 16/Nov/19 Updated: 28/Oct/23 Resolved: 20/Apr/20 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | BSON |
| Affects Version/s: | 3.4.0 |
| Fix Version/s: | 3.6.0-rc0, 3.6.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Rohit Vishwakarma | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Description |
|
I'm currently writing generic template function that will recursively serialize and deserialize the object from document::element. Everything works fine until it encounters an array field. array::element currently inherits document::element, therefore important function key() is not available to check field name before deserializing. Please see the code comment line#6. |
| Comments |
| Comment by Kevin Albertson [ 20/Apr/20 ] |
|
array::element now includes the missing key() function. |
| Comment by Githook User [ 20/Apr/20 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message: |
| Comment by Kevin Albertson [ 17/Apr/20 ] |
|
Hello inbox.rohitv@gmail.com. Thank you for reporting, and my sincere apologies for the very long delayed response. I believe not exposing the key() function on bsoncxx::array::element was an oversight on our part, and should be resolved in an upcoming release. Thank you, |