Skip to main content
🇪🇸 Español 🇧🇷 Português 🇩🇪 Deutsch
Image Converter Video Converter Audio Converter Document Converter
Tools Guides Formats Pricing API
Log In
Guide

BSON: Binary JSON — MongoDB's Native Data Format

PC By Pablo Cirre

Frequently Asked Questions

BSON trades compactness for traversal speed. Every string in BSON has a 4-byte length prefix (allowing the parser to skip over it without scanning for the end), every field name is null-terminated (adding 1 byte per field), and every element is prefixed with a 1-byte type identifier. For documents with many short string values, this overhead makes BSON larger than minified JSON. However, for integers (stored as 4 or 8 bytes rather than text digits), dates (8 bytes vs 24-char ISO string), and binary data (no base64 overhead), BSON is significantly more compact.

Send <strong>PDF</strong> when the document is final and the layout must be preserved exactly (contracts, invoices, certificates). Send <strong>DOCX</strong> when reviewers need to edit, comment, or track changes. Many teams send both: PDF as the canonical version + DOCX for editable feedback. PDF/A is the right pick for legal archival (ISO 19005).

A MongoDB ObjectId is a 12-byte unique identifier consisting of: 4 bytes of Unix timestamp (second precision), 3 bytes of machine identifier (usually derived from the hostname or MAC address), 2 bytes of process ID, and 3 bytes of a per-process counter. This structure means ObjectIds are unique across a MongoDB cluster without requiring server-side coordination — each client driver generates ObjectIds independently. The embedded timestamp also makes ObjectIds monotonically increasing within a second, which aids index performance and provides creation time without a separate timestamp field.

A MongoDB ObjectId is a 12-byte unique identifier consisting of: 4 bytes of Unix timestamp (second precision), 3 bytes of machine identifier (Geralmente derived de the hostname ou MAC address), 2 bytes of process ID, e 3 bytes of a per-process counter. This structure means ObjectIds are unique across a MongoDB cluster sem requiring server-side coordination — each client driver generates ObjectIds independently. The embedded timestamp also makes ObjectIds monotonically increasing within a second, which aids index performance e fornece creation time sem a separate timestamp field.

A MongoDB ObjectId is a 12-byte unique identifier consisting of: 4 bytes von Unix timestamp (second precision), 3 bytes von machine identifier (Normalerweise derived von the hostname oder MAC address), 2 bytes von process ID, und 3 bytes eines per-process counter. This structure means ObjectIds are unique across a MongoDB cluster ohne requiring server-side coordination — each client driver generates ObjectIds independently. The embedded timestamp also makes ObjectIds monotonically increasing within a second, which aids index performance und bietet creation time ohne a separate timestamp field.

A MongoDB ObjectId is a 12-byte unique identifier consisting of: 4 bytes de Unix timestamp (second precision), 3 bytes de machine identifier (Normalmente derived de the hostname o MAC address), 2 bytes de process ID, y 3 bytes de un per-process counter. This structure means ObjectIds are unique across a MongoDB cluster sin requiring server-side coordination — each client driver generates ObjectIds independently. The embedded timestamp also makes ObjectIds monotonically increasing within a second, which aids index performance y proporciona creation time sin a separate timestamp field.

Round-tripping between similar formats (DOCX ↔ ODT, DOCX → PDF) is generally safe. Round-tripping with format-specific features (Word macros, complex tables, footnotes) often loses fidelity. Embedded fonts survive only if both source and target support font embedding (PDF yes, DOCX yes, plain HTML no). Always preview the result before deleting the original.

Decimal128 is a 128-bit IEEE 754 decimal floating-point type that can represent decimal fractions exactly — without the rounding errors of binary floating-point. For example, 0.1 + 0.2 in IEEE 754 binary double gives 0.30000000000000004; in Decimal128 it gives exactly 0.3. Use Decimal128 for any monetary value, financial calculation, or measurement where exact decimal representation matters. Store prices, interest rates, tax amounts, and exchange rates as Decimal128, not as double (BSON type 0x01). The Python pymongo driver exposes Decimal128 as bson.Decimal128, which wraps Python's decimal.Decimal.

Decimal128 is a 128-bit IEEE 754 decimal floating-point type that can represent decimal fractions exactly — sem the rounding errors of binary floating-point. Por exemplo, 0.1 + 0.2 in IEEE 754 binary double gives 0.30000000000000004; in Decimal128 it gives exactly 0.3. usar Decimal128 para any monetary value, financial calculation, ou measurement where exact decimal representation matters. Store prices, interest rates, tax amounts, e exchange rates as Decimal128, not as double (BSON type 0x01). The Python pymongo driver exposes Decimal128 as bson.Decimal128, which wraps Python's decimal.Decimal.

Decimal128 is a 128-bit IEEE 754 decimal floating-point type that can represent decimal fractions exactly — ohne the rounding errors von binary floating-point. Zum Beispiel, 0.1 + 0.2 in IEEE 754 binary double gives 0.30000000000000004; in Decimal128 it gives exactly 0.3. verwenden Decimal128 für any monetary value, financial calculation, oder measurement where exact decimal representation matters. Store prices, interest rates, tax amounts, und exchange rates as Decimal128, not as double (BSON type 0x01). The Python pymongo driver exposes Decimal128 as bson.Decimal128, which wraps Python's decimal.Decimal.

Decimal128 is a 128-bit IEEE 754 decimal floating-point type that can represent decimal fractions exactly — sin the rounding errors de binary floating-point. Por ejemplo, 0.1 + 0.2 in IEEE 754 binary double gives 0.30000000000000004; in Decimal128 it gives exactly 0.3. usar Decimal128 para any monetary value, financial calculation, o measurement where exact decimal representation matters. Store prices, interest rates, tax amounts, y exchange rates as Decimal128, not as double (BSON type 0x01). The Python pymongo driver exposes Decimal128 as bson.Decimal128, which wraps Python's decimal.Decimal.

If the PDF contains real text (not scanned images), <code>pdftotext</code> from poppler-utils or <a href="/convert/pdf-to-txt">PDF to TXT</a> works in seconds. If the PDF is a scanned image, you need OCR — Tesseract is the open-source standard. KaijuConverter's PDF tools auto-detect text-vs-image PDFs and route accordingly.

MongoDB uses the WiredTiger storage engine (default since MongoDB 3.2), which stores documents as BSON-encoded byte sequences in its B-tree data files. WiredTiger applies Snappy compression to data blocks by default (configurable to zstd, lzf, or none). Indexes store BSON-encoded key values pointing to document locations. The 16 MB document size limit is enforced at the BSON layer before the document reaches the storage engine. WiredTiger supports document-level locking for writes, which is why BSON's in-place update capability (enabled by its size-prefixed structure) is important for MongoDB's concurrency model.

Light edits (annotations, signatures, form fields) are fine in any PDF reader. Structural edits (changing paragraphs, replacing images) are awkward — PDF is a presentation format, not an editing format. The robust workflow is: keep the source DOCX/MD/HTML as the master, regenerate the PDF when changes are needed. Tools that "edit PDFs" reverse-engineer the layout and frequently break it.

We use cookies and similar technologies to personalise content and ads, and to analyse traffic. Learn more about cookies.