HOME

TheInfoList



OR:

Smile is a computer data interchange format based on
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
. It can also be considered a binary serialization of the generic JSON data model, which means tools that operate on JSON may be used with Smile as well, as long as a proper encoder/decoder exists for the tool. The name comes from the first 2 bytes of the 4 byte header, which consist of
Smiley A smiley, sometimes referred to as a smiley face, is a basic ideogram that represents a smiling face. Since the 1950s it has become part of popular culture worldwide, used either as a standalone ideogram, or as a form of communication, such a ...
":)" followed by a linefeed: a choice made to make it easier to recognize Smile-encoded data files using textual command-line tools.


Efficiency

Compared to JSON, Smile is both more compact and more efficient to process (both to read and write). Part of this is due to more efficient binary encoding (similar to
BSON BSON () is a computer data interchange format. The name "BSON" is based on the term JSON and stands for "Binary JSON". It is a binary form for representing simple or complex data structures including associative arrays (also known as name-value ...
,
CBOR Concise Binary Object Representation (CBOR) is a binary data serialization format loosely based on JSON authored by C. Bormann. Like JSON it allows the transmission of data objects that contain name–value pairs, but in a more concise manner. ...
and UBJSON), but an additional feature is optional use of back references for property names and values. Back referencing allows replacing of property names and/or short (64 bytes or less) String values with 1- or 2-byte reference ids.


Implementations

Libraries known to support Smile include:
Cheshire
(Clojure) is a data encoding library that supports Smile as binary alternative to
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
*
Jackson Jackson may refer to: People and fictional characters * Jackson (name), including a list of people and fictional characters with the surname or given name Places Australia * Jackson, Queensland, a town in the Maranoa Region * Jackson North, Qu ...
(Java) wit
Binary dataformat module
supporting Smile, Avro,
CBOR Concise Binary Object Representation (CBOR) is a binary data serialization format loosely based on JSON authored by C. Bormann. Like JSON it allows the transmission of data objects that contain name–value pairs, but in a more concise manner. ...
, Ion and
Protocol Buffers Protocol Buffers (Protobuf) is a free and open-source cross-platform data format used to serialize structured data. It is useful in developing programs to communicate with each other over a network or for storing data. The method involves an inte ...

libsmile
(C/C++; wrappers for Ruby, Perl)
go-smile
for decoding Smile data in Golang
Protostuff
(Java) supports multiple data formats for serialization, including Smile,
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. ...
and
Protocol Buffers Protocol Buffers (Protobuf) is a free and open-source cross-platform data format used to serialize structured data. It is useful in developing programs to communicate with each other over a network or for storing data. The method involves an inte ...
.
PySmile
for encoding/decoding Smile data in Python
NewSmile
for encoding/decoding Smile data in Python >= 3.7
smile-js
for decoding Smile data from Javascript


See also

*
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
*
BSON BSON () is a computer data interchange format. The name "BSON" is based on the term JSON and stands for "Binary JSON". It is a binary form for representing simple or complex data structures including associative arrays (also known as name-value ...
*
CBOR Concise Binary Object Representation (CBOR) is a binary data serialization format loosely based on JSON authored by C. Bormann. Like JSON it allows the transmission of data objects that contain name–value pairs, but in a more concise manner. ...
* UBJSON *
Comparison of data serialization formats This is a comparison of data serialization formats, various ways to convert complex objects to sequences of bits. It does not include markup languages used exclusively as document file format A document file format is a text or binary file for ...


References


External links


Smile format specification
{{Data Exchange JSON Data serialization formats