.\" Man page generated from reStructuredText. . .TH "BSON_VALIDATE" "3" "Feb 23, 2019" "1.14.0" "Libbson" .SH NAME bson_validate \- bson_validate() . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C bool bson_validate (const bson_t *bson, bson_validate_flags_t flags, size_t *offset); .ft P .fi .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBbson\fP: A \fBbson_t\fP\&. .IP \(bu 2 \fBflags\fP: A bitwise\-or of all desired \fBbson_validate_flags_t\fP\&. .IP \(bu 2 \fBoffset\fP: A location for the offset within \fBbson\fP where the error occurred. .UNINDENT .SH DESCRIPTION .sp Validates a BSON document by walking through the document and inspecting the keys and values for valid content. .sp You can modify how the validation occurs through the use of the \fBflags\fP parameter, see \fBbson_validate_with_error()\fP for details. .SH SEE ALSO .sp \fBbson_validate_with_error()\fP\&. .sp \fBbson_visitor_t\fP can be used for custom validation, example_custom_validation\&. .SH RETURNS .sp Returns true if \fBbson\fP is valid; otherwise false and \fBoffset\fP is set to the byte offset where the error was detected. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .