Hubbry Logo
search
logo
UBJSON
UBJSON
current hub

UBJSON

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
UBJSON

Universal Binary JSON (UBJSON) is a computer data interchange format. It is a binary form directly imitating JSON, but requiring fewer bytes of data. It aims to achieve the generality of JSON, combined with being much easier to process than JSON.

UBJSON is a proposed successor to BSON, BJSON and others. UBJSON has the following goals:

UBJSON data can be either a value or a container.

UBJSON uses a single binary tuple to represent all JSON value types:

Each element in the tuple is defined as:

The type is a 1-byte ASCII character used to indicate the type of the data following it. The ASCII characters were chosen to make manually walking and debugging data stored in the UBJSON format as easy as possible (e.g. making the data relatively readable in a hex editor). Types are available for the five JSON value types. There is also a no-op type used for stream keep-alive.

High-precision numbers are represented as an arbitrarily long, UTF-8 string-encoded numeric value.

The length is an integer number (e.g. uint8, or int64) encoding the size of the data payload in bytes. It is used for strings, high-precision numbers and optionally containers. They are omitted for other types.

See all
User Avatar
No comments yet.