Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hex/src/data/deps.ts>mongo.Bson.DeserializeOptions

An ecosystem delivering practices, philosophy and portability.
Go to Latest
interface mongo.Bson.DeserializeOptions
Re-export
import { type mongo } from "https://deno.land/x/hex@0.5.15/src/data/deps.ts";
const { DeserializeOptions } = mongo.Bson;

Properties

optional
evalFunctions: boolean

evaluate functions in the BSON document scoped to the object deserialized.

optional
cacheFunctions: boolean

cache evaluated functions for reuse.

optional
promoteLongs: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits

optional
promoteBuffers: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

optional
promoteValues: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

optional
fieldsAsRaw: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

optional
bsonRegExp: boolean

return BSON regular expressions as BSONRegExp instances.

optional
allowObjectSmallerThanBufferSize: boolean

allows the buffer to be larger than the parsed BSON object

optional
index: number

Offset into buffer to begin reading document from

optional
raw: boolean
optional
validation: { utf8: boolean | Record<string, true> | Record<string, false>; }

Allows for opt-out utf-8 validation for all keys or specified keys. Must be all true or all false.