1BSON_VALIDATE(3) Libbson BSON_VALIDATE(3)
2
3
4
6 bson_validate - bson_validate()
7
9 bool
10 bson_validate (const bson_t *bson, bson_validate_flags_t flags, size_t *offset);
11
13 · bson: A bson_t.
14
15 · flags: A bitwise-or of all desired bson_validate_flags_t.
16
17 · offset: A location for the offset within bson where the error
18 occurred.
19
21 Validates a BSON document by walking through the document and inspect‐
22 ing the keys and values for valid content.
23
24 You can modify how the validation occurs through the use of the flags
25 parameter, see bson_validate_with_error() for details.
26
28 bson_validate_with_error().
29
30 bson_visitor_t can be used for custom validation, example_custom_vali‐
31 dation.
32
34 Returns true if bson is valid; otherwise false and offset is set to the
35 byte offset where the error was detected.
36
38 MongoDB, Inc
39
41 2017-present, MongoDB, Inc
42
43
44
45
461.14.0 Feb 22, 2019 BSON_VALIDATE(3)