1BSON_VALIDATE(3)                    libbson                   BSON_VALIDATE(3)
2
3
4

NAME

6       bson_validate - bson_validate()
7

SYNOPSIS

9          bool
10          bson_validate (const bson_t *bson, bson_validate_flags_t flags, size_t *offset);
11

PARAMETERS

13bson: A bson_t.
14
15flags: A bitwise-or of all desired bson_validate_flags_t.
16
17offset:  A  location  for  the offset within bson where the error oc‐
18         curred.
19

DESCRIPTION

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

RETURNS

28       Returns true if bson is valid; otherwise false and offset is set to the
29       byte offset where the error was detected.
30
31       SEE ALSO:
32          bson_validate_with_error().
33
34          bson_visitor_t can be used for custom validation, Example Custom Validation.
35
36

AUTHOR

38       MongoDB, Inc
39
41       2017-present, MongoDB, Inc
42
43
44
45
461.23.1                           Oct 20, 2022                 BSON_VALIDATE(3)
Impressum