BSON

Binary Javascript Object Notation
Dateiendung: .bson
MIME-Type: application/bson
Aktuelle Version 1.1
Erweitert von: JSON
https://bsonspec.org/


BSON kurz für Binary Javascript Object Notation oder Binary JSON ist ein offenes Dateiformat, das zu den Binärvarianten von JSON zählt.

Struktur

Binäres JSON zeichnet sich nicht ausschließlich durch eine Binärdarstellung aus, sondern fügt auch neue Datentypen wie eine Datumsangabe oder Binärblobs hinzu.[1]

Beispielsweise würde folgendes JSON:

{"Hallo": "Welt"}

wie folgt in BSON übersetzt:

\x16\x00\x00\x00       // Gesamtdokumentengröße
\x02                   // 0x02 = Typ String
Hallo\x00              // Feldname
\x06\x00\x00\Welt\x00  // Wert
\x00                   // 0x00 = Terminator

Eigenschaften

In der Dateigröße ist BSON vergleichbar mit dem Ursprungsformat JSON wobei diese abhängig von der Nutzlast ist. Kodierung und Dekodierung sind effizienter, da numerische Datentypen als Zahl und nicht als Zeichenkette gespeichert wird. Ein BSON-Dokument lässt sich auch leichter durchsuchen, da Elementen ein Längenfeld vorangestellt ist.[2]

Verwendung

Es ist das primäre Datenformat von MongoDB.[3] Es wird jedoch auch von IBM DB/2 unterstützt.[4] Zudem bietet die ASP.NET Programmierschnittstelle serverseitige Unterstützung für BSON.[2]

Einzelnachweise

  1. JSON Und BSON. In: MongoDB. Abgerufen am 2. August 2026.
  2. a b Rick-Anderson: BSON-Unterstützung in ASP.NET Web-API 2.1 – ASP.NET 4.x. Microsoft, abgerufen am 2. August 2026.
  3. Leo Schulz: MongoDB Bson Tutorial: Was ist BSON und wie unterscheidet es sich von JSON? 28. Oktober 2024, abgerufen am 2. August 2026.
  4. JSON-Dokumentdarstellung. IBM, 6. Januar 2026, abgerufen am 2. August 2026.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.