<s>
BSON	B-Protocol
(	O
)	O
is	O
a	O
computer	O
data	O
interchange	O
format	O
.	O
</s>
<s>
The	O
name	O
"	O
BSON	B-Protocol
"	O
is	O
based	O
on	O
the	O
term	O
JSON	B-General_Concept
and	O
stands	O
for	O
"	O
Binary	B-Protocol
JSON	I-Protocol
"	O
.	O
</s>
<s>
It	O
is	O
a	O
binary	O
form	O
for	O
representing	O
simple	O
or	O
complex	O
data	B-General_Concept
structures	I-General_Concept
including	O
associative	B-Application
arrays	I-Application
(	O
also	O
known	O
as	O
name-value	O
pairs	O
)	O
,	O
integer	O
indexed	O
arrays	O
,	O
and	O
a	O
suite	O
of	O
fundamental	O
scalar	O
types	O
.	O
</s>
<s>
BSON	B-Protocol
originated	O
in	O
2009	O
at	O
MongoDB	B-Application
.	O
</s>
<s>
Several	O
scalar	O
data	O
types	O
are	O
of	O
specific	O
interest	O
to	O
MongoDB	B-Application
and	O
the	O
format	O
is	O
used	O
both	O
as	O
a	O
data	O
storage	O
and	O
network	O
transfer	O
format	O
for	O
the	O
MongoDB	B-Application
database	O
,	O
but	O
it	O
can	O
be	O
used	O
independently	O
outside	O
of	O
MongoDB	B-Application
.	O
</s>
<s>
Implementations	O
are	O
available	O
in	O
a	O
variety	O
of	O
languages	O
such	O
as	O
C	B-Language
,	O
C++	B-Language
,	O
C#	B-Application
,	O
D	B-Application
,	O
Delphi	B-Language
,	O
Erlang	B-Operating_System
,	O
Go	B-Application
,	O
Haskell	B-Language
,	O
Java	B-Language
,	O
JavaScript	B-Language
,	O
Julia	B-Application
,	O
Lua	B-Language
,	O
OCaml	B-Language
,	O
Perl	B-Language
,	O
PHP	B-Application
,	O
Python	B-Language
,	O
Ruby	B-Language
,	O
Rust	B-Application
,	O
Scala	B-Application
,	O
Smalltalk	B-Application
,	O
and	O
Swift	B-Application
.	O
</s>
<s>
BSON	B-Protocol
has	O
a	O
published	O
specification	O
.	O
</s>
<s>
An	O
important	O
differentiator	O
to	O
JSON	B-General_Concept
is	O
that	O
BSON	B-Protocol
contains	O
types	O
not	O
present	O
in	O
JSON	B-General_Concept
(	O
e.g.	O
</s>
<s>
For	O
situations	O
where	O
these	O
additional	O
types	O
need	O
to	O
be	O
represented	O
in	O
a	O
textual	O
way	O
,	O
MongoDB	B-Application
's	O
Extended	O
JSON	B-General_Concept
format	O
can	O
be	O
used	O
.	O
</s>
<s>
Compared	O
to	O
JSON	B-General_Concept
,	O
BSON	B-Protocol
is	O
designed	O
to	O
be	O
efficient	O
both	O
in	O
storage	O
space	O
and	O
scan-speed	O
.	O
</s>
<s>
Large	O
elements	O
in	O
a	O
BSON	B-Protocol
document	O
are	O
prefixed	O
with	O
a	O
length	O
field	O
to	O
facilitate	O
scanning	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
BSON	B-Protocol
will	O
use	O
more	O
space	O
than	O
JSON	B-General_Concept
due	O
to	O
the	O
length	O
prefixes	O
and	O
explicit	O
array	O
indices	O
.	O
</s>
