<s>
Universal	O
Binary	B-Protocol
JSON	I-Protocol
(	O
UBJSON	B-Protocol
)	O
is	O
a	O
computer	O
data	O
interchange	O
format	O
.	O
</s>
<s>
It	O
is	O
a	O
binary	O
form	O
directly	O
imitating	O
JSON	B-General_Concept
,	O
but	O
requiring	O
fewer	O
bytes	O
of	O
data	O
.	O
</s>
<s>
It	O
aims	O
to	O
achieve	O
the	O
generality	O
of	O
JSON	B-General_Concept
,	O
combined	O
with	O
being	O
much	O
easier	O
to	O
process	O
than	O
JSON	B-General_Concept
.	O
</s>
<s>
UBJSON	B-Protocol
is	O
a	O
proposed	O
successor	O
to	O
BSON	B-Protocol
,	O
BJSON	O
and	O
others	O
.	O
</s>
<s>
UBJSON	B-Protocol
has	O
the	O
following	O
goals	O
:	O
</s>
<s>
Complete	O
compatibility	O
with	O
the	O
JSON	B-General_Concept
specification	O
–	O
there	O
is	O
a	O
1:1	O
mapping	O
between	O
standard	O
JSON	B-General_Concept
and	O
UBJSON	B-Protocol
.	O
</s>
<s>
Speed	O
and	O
efficiency	O
–	O
UBJSON	B-Protocol
uses	O
data	O
representations	O
that	O
are	O
(	O
roughly	O
)	O
30%	O
smaller	O
than	O
their	O
compacted	O
JSON	B-General_Concept
counterparts	O
and	O
are	O
optimized	O
for	O
fast	O
parsing	O
.	O
</s>
<s>
Streamed	O
serialisation	O
is	O
supported	O
,	O
meaning	O
that	O
the	O
transfer	O
of	O
UBJSON	B-Protocol
over	O
a	O
network	O
connection	O
can	O
start	O
sending	O
data	O
before	O
the	O
final	O
size	O
of	O
the	O
data	O
is	O
known	O
.	O
</s>
<s>
UBJSON	B-Protocol
data	O
can	O
be	O
either	O
a	O
value	O
or	O
a	O
container	O
.	O
</s>
<s>
UBJSON	B-Protocol
uses	O
a	O
single	O
binary	O
tuple	O
to	O
represent	O
all	O
JSON	B-General_Concept
value	O
types	O
:	O
</s>
<s>
The	O
type	O
is	O
a	O
1-byte	O
ASCII	B-Protocol
character	I-Protocol
used	O
to	O
indicate	O
the	O
type	O
of	O
the	O
data	O
following	O
it	O
.	O
</s>
<s>
The	O
ASCII	B-Protocol
characters	I-Protocol
were	O
chosen	O
to	O
make	O
manually	O
walking	O
and	O
debugging	O
data	O
stored	O
in	O
the	O
UBJSON	B-Protocol
format	O
as	O
easy	O
as	O
possible	O
(	O
e.g.	O
</s>
<s>
Types	O
are	O
available	O
for	O
the	O
five	O
JSON	B-General_Concept
value	O
types	O
.	O
</s>
<s>
There	O
is	O
also	O
a	O
no-op	B-Language
type	O
used	O
for	O
stream	O
keep-alive	O
.	O
</s>
<s>
High-precision	B-Algorithm
numbers	O
are	O
represented	O
as	O
an	O
arbitrarily	O
long	O
,	O
UTF-8	O
string-encoded	O
numeric	O
value	O
.	O
</s>
<s>
uint8	O
,	O
or	O
int64	B-Device
)	O
encoding	O
the	O
size	O
of	O
the	O
data	O
payload	O
in	O
bytes	O
.	O
</s>
<s>
It	O
is	O
used	O
for	O
strings	O
,	O
high-precision	B-Algorithm
numbers	O
and	O
optionally	O
containers	O
.	O
</s>
<s>
Similarly	O
to	O
JSON	B-General_Concept
,	O
UBJSON	B-Protocol
defines	O
two	O
container	O
types	O
:	O
array	O
and	O
object	O
.	O
</s>
<s>
This	O
ensures	O
binary	O
efficiency	O
while	O
maintaining	O
compatibility	O
with	O
JSON	B-General_Concept
,	O
even	O
though	O
JSON	B-General_Concept
has	O
no	O
direct	O
support	O
for	O
binary	O
data	O
.	O
</s>
<s>
The	O
MIME	B-Application
type	I-Application
'	O
application/ubjson	O
'	O
is	O
recommended	O
,	O
as	O
is	O
the	O
file	O
extension	O
'	O
.ubj	O
'	O
when	O
stored	O
in	O
a	O
file-system	O
.	O
</s>
<s>
The	O
Wolfram	B-Language
Language	I-Language
introduced	O
support	O
for	O
UBJSON	B-Protocol
in	O
2017	O
,	O
with	O
version	O
11.1	O
of	O
the	O
language	O
.	O
</s>
