[CXX-527] Add validate method to bsoncxx Created: 12/Feb/15  Updated: 24/Apr/15  Resolved: 27/Mar/15

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

Type: New Feature Priority: Major - P3
Reporter: Mira Carey Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: PM-123

 Description   

we need a validation method for bsoncxx.

It should probably look something like:

std::optional<document::view> document::validate(trivial_buffer buf, validator& v);

Then validator might looks like:

struct validator {
bool validate_utf8;
bool validate_dollar_keys;
bool validate_dot_keys;
bool validate_utf8_allow_null;
std::uint8_t* error;
}

on success we return an engaged document::view.

On error we return an unengaged view, setting the error field in the validator



 Comments   
Comment by Githook User [ 27/Mar/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: CXX-527 provide an API for BSON validation
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/d70218fcbd752c3c2a5aa27357dcd0ade51bed42

Comment by Adam Midvidy [ 11/Mar/15 ]

https://github.com/mongodb/mongo-cxx-driver/pull/267/files

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