Man page - bson_validate_flags_t(3)
Packages contas this manual
- bson_oid_equal_unsafe(3)
- bson_string_append_c(3)
- bson_oid_init_from_string_unsafe(3)
- bson_get_micro_version(3)
- bson_steal(3)
- bson_append_array(3)
- bson_writer_get_length(3)
- bson_oid_get_time_t(3)
- bson_iter_double(3)
- bson_append_timeval(3)
- bson_iter_regex(3)
- bson_decimal128_to_string(3)
- bson_iter_dbpointer(3)
- bson_init_static(3)
- bson_reserve_buffer(3)
- bson_type_t(3)
- bson_iter_find_w_len(3)
- bson_json_opts_set_outermost_array(3)
- bson_writer_end(3)
- bson_get_minor_version(3)
- bson_destroy_with_steal(3)
- bson_json_data_reader_new(3)
- bson_strdup_printf(3)
- bson_json_reader_new(3)
- bson_iter_overwrite_bool(3)
- bson_string_truncate(3)
- bson_reader_read_func_t(3)
- bson_init(3)
- bson_reader_tell(3)
- bson_unichar_t(3)
- bson_destroy(3)
- bson_ascii_strtoll(3)
- bson_realloc_ctx(3)
- bson_copy_to(3)
- bson_append_undefined(3)
- bson_iter_key_len(3)
- bson_reader_set_destroy_func(3)
- bson_iter_document(3)
- bson_iter_init_from_data(3)
- bson_json_reader_new_from_file(3)
- bson_append_code_with_scope(3)
- bson_malloc0(3)
- bson_append_array_end(3)
- bson_context_destroy(3)
- bson_iter_timestamp(3)
- bson_append_value(3)
- bson_iter_as_double(3)
- bson_append_utf8(3)
- bson_uint32_to_string(3)
- bson_check_version(3)
- bson_compare(3)
- bson_iter_symbol(3)
- bson_reinit(3)
- bson_as_legacy_extended_json(3)
- bson_iter_utf8(3)
- bson_iter_init(3)
- bson_append_now_utc(3)
- bson_writer_t(3)
- bson_iter_as_int64(3)
- bson_iter_type(3)
- bson_strcasecmp(3)
- bson_iter_date_time(3)
- bson_append_iter(3)
- bson_reader_set_read_func(3)
- bson_array_as_relaxed_extended_json(3)
- bson_oid_compare(3)
- bson_iter_dup_utf8(3)
- bson_append_array_begin(3)
- bson_strdup(3)
- bson_string_free(3)
- bson_iter_timeval(3)
- bson_iter_find(3)
- bson_writer_begin(3)
- bson_append_int32(3)
- bson_append_code(3)
- bson_equal(3)
- bson_append_oid(3)
- bson_get_major_version(3)
- bson_value_copy(3)
- bson_append_time_t(3)
- bson_iter_overwrite_int64(3)
- bson_iter_overwrite_date_time(3)
- bson_append_symbol(3)
- bson_iter_init_from_data_at_offset(3)
- bson_iter_int64(3)
- bson_oid_init_from_string(3)
- bson_append_dbpointer(3)
- bson_has_field(3)
- bson_json_reader_new_from_fd(3)
- bson_count_keys(3)
- bson_t(3)
- bson_strncpy(3)
- bson_validate_with_error_and_offset(3)
- bson_iter_offset(3)
- bson_iter_bool(3)
- bson_init_from_json(3)
- bson_new_from_data(3)
- bson_reader_new_from_data(3)
- bson_append_document_end(3)
- bson_malloc(3)
- bson_append_bool(3)
- bson_iter_oid(3)
- bson_iter_value(3)
- bson_json_reader_t(3)
- bson_as_canonical_extended_json(3)
- bson_append_document(3)
- bson_writer_rollback(3)
- bson_oid_copy_unsafe(3)
- bson_iter_overwrite_oid(3)
- bson_new(3)
- bson_oid_hash(3)
- bson_copy_to_excluding(3)
- bson_validate_flags_t(3)
- bson_append_double(3)
- bson_append_document_begin(3)
- bson_oid_copy(3)
- bson_iter_init_find_case(3)
- bson_oid_equal(3)
- bson_value_t(3)
- bson_iter_key(3)
- bson_aligned_alloc(3)
- bson_reader_destroy(3)
- bson_sized_new(3)
- bson_iter_init_find_w_len(3)
- bson_json_opts_t(3)
- bson_iter_array(3)
- bson_array_as_legacy_extended_json(3)
- bson_reader_read(3)
- bson_append_date_time(3)
- bson_iter_codewscope(3)
- bson_writer_destroy(3)
- bson_strdupv_printf(3)
- bson_iter_code(3)
- bson_iter_overwrite_int32(3)
- bson_utf8_get_char(3)
- bson_string_t(3)
- bson_memory(3)
- bson_zero_free(3)
- bson_validate(3)
- bson_append_regex(3)
- bson_set_error(3)
- bson_as_json(3)
- bson_copy(3)
- bson_decimal128_t(3)
- bson_reference(3)
- bson_array_as_json(3)
- bson_context_t(3)
- bson_get_version(3)
- bson_iter_binary(3)
- bson_iter_int32(3)
- bson_iter_find_descendant(3)
- bson_vsnprintf(3)
- bson_reader_new_from_fd(3)
- bson_json_mode_t(3)
- bson_visitor_t(3)
- bson_append_minkey(3)
- bson_array_as_canonical_extended_json(3)
- bson_get_monotonic_time(3)
- bson_append_binary(3)
- bson_string_append(3)
- bson_strfreev(3)
- bson_reader_new_from_handle(3)
- bson_string_append_unichar(3)
- bson_iter_as_bool(3)
- bson_subtype_t(3)
- bson_utf8_next_char(3)
- bson_utf8_escape_for_json(3)
- bson_append_timestamp(3)
- bson_oid_to_string(3)
- bson_iter_decimal128(3)
- bson_character_and_string_routines(3)
- bson_get_data(3)
- bson_writer_new(3)
- bson_json_opts_destroy(3)
- bson_reader_reset(3)
- bson_oid_init_from_data(3)
- bson_free(3)
- bson_utf8_from_unichar(3)
- bson_value_destroy(3)
- bson_oid_is_valid(3)
- bson_reader_new_from_file(3)
- bson_oid_compare_unsafe(3)
- bson_strndup(3)
- bson_array_builder_t(3)
- bson_append_null(3)
- bson_json_opts_new(3)
- bson_string_append_printf(3)
- bson_utf8_validate(3)
- bson_context_new(3)
- bson_iter_overwrite_double(3)
- bson_append_maxkey(3)
- bson_error_t(3)
- bson_iter_find_case(3)
- bson_mem_restore_vtable(3)
- bson_iter_overwrite_timestamp(3)
- bson_new_from_json(3)
- bson_oid_hash_unsafe(3)
- bson_append_regex_w_len(3)
- bson_iter_recurse(3)
- bson_append_int64(3)
- bson_reader_t(3)
- bson_oid_get_time_t_unsafe(3)
- bson_aligned_alloc0(3)
- bson_new_from_buffer(3)
- bson_copy_to_excluding_noinit_va(3)
- bson_version(3)
- bson_string_new(3)
- bson_validate_with_error(3)
- bson_json_data_reader_ingest(3)
- bson_strnlen(3)
- bson_iter_next(3)
- bson_realloc(3)
- bson_oid_init_sequence(3)
- bson_decimal128_from_string_w_len(3)
- bson_as_json_with_opts(3)
- bson_concat(3)
- bson_oid_t(3)
- bson_strerror_r(3)
- bson_reader_destroy_func_t(3)
- bson_snprintf(3)
- bson_as_relaxed_extended_json(3)
- bson_mem_set_vtable(3)
- bson_oid_init(3)
- bson_iter_init_find(3)
- bson_context_get_default(3)
- bson_isspace(3)
- bson_decimal128_from_string(3)
- bson_iter_visit_all(3)
- bson_iter_t(3)
- bson_copy_to_excluding_noinit(3)
- bson_append_decimal128(3)
- bson_realloc_func(3)
- bson_json_reader_destroy(3)
- bson_iter_overwrite_decimal128(3)
- bson_iter_time_t(3)
- bson_json_reader_read(3)
apt-get install libbson-doc
Manual
| BSON_VALIDATE_FLAGS_T(3) | libbson | BSON_VALIDATE_FLAGS_T(3) |
Document validation options
SYNOPSIS
#include <bson/bson-types.h>
typedef enum {
BSON_VALIDATE_NONE = 0,
BSON_VALIDATE_UTF8 = (1 << 0),
BSON_VALIDATE_DOLLAR_KEYS = (1 << 1),
BSON_VALIDATE_DOT_KEYS = (1 << 2),
BSON_VALIDATE_UTF8_ALLOW_NULL = (1 << 3),
BSON_VALIDATE_EMPTY_KEYS = (1 << 4),
} bson_validate_flags_t;
DESCRIPTION
bson_validate_flags_t is a set of binary flags which may be combined to specify a level of BSON document validation.
A value of 0, false, or BSON_VALIDATE_NONE equivalently requests the minimum applicable level of validation.
In the context of validation APIs bson_validate(), bson_validate_with_error(), and bson_validate_with_error_and_offset() the minimum validation still guarantees that a document can be successfully traversed by bson_iter_visit_all().
Higher level APIs using this type may have different minimum validation levels. For example, libmongoc functions that take bson_validate_flags_t use 0 to mean the document contents are not visited and malformed headers will not be detected by the client.
Each defined flag aside from BSON_VALIDATE_NONE describes an optional validation feature that may be enabled, alone or in combination with other features:
- BSON_VALIDATE_NONE Minimum level of validation; in libbson, validates element headers.
- BSON_VALIDATE_UTF8 All keys and string values are checked for invalid UTF-8.
- BSON_VALIDATE_UTF8_ALLOW_NULL String values are allowed to have embedded NULL bytes.
- BSON_VALIDATE_DOLLAR_KEYS Prohibit keys that start with $ outside of a "DBRef" subdocument.
- BSON_VALIDATE_DOT_KEYS Prohibit keys that contain . anywhere in the string.
- BSON_VALIDATE_EMPTY_KEYS Prohibit zero-length keys.
SEE ALSO:
bson_validate(), bson_validate_with_error(), bson_validate_with_error_and_offset().
bson_visitor_t can be used for custom validation, Example Custom Validation.
AUTHOR
MongoDB, Inc
COPYRIGHT
2009-present, MongoDB, Inc.
| December 18, 2025 | 1.30.4 |