가.개요
BSON은 컴퓨터 데이터를 상호 교환하기 위한 양식이다. 이것은 간단한 구조화 결합된 배열을 나타내는 Binary 폼이다. BSON은 Binary JSON의 약어이다.
나.Data Type and Syntax
BSON 문서(혹은 객체)는 element들의 리스트로 구성되어 있다. 각각의 Element는 field name, type, value로 구성되어 있다. field name은 문자열이다.
type은 string, integer, double, date, byte array(binary), boolean(true/false), null, BSON object, BSON array 을 포함한다.
이는 JSON을 포함한다. (예를 들면, JSON은 byte array가 없다.). 그러나 길이 제한때문에 몇몇 valid JSON의 값(very long string)이 BSON에서는 not valid 한 값이기도 하다.
출처 : Wikipedia.org
BSON [bee · sahn], short for Binary JSON, is a binary-encoded serialization of JSON-like documents. Like JSON, BSON supports the embedding of documents and arrays within other documents and arrays. BSON also contains extensions that allow representation of data types that are not part of the JSON spec. For example, BSON has a Date type and a BinData type.
BSON can be compared to binary interchange formats, like Protocol Buffers. BSON is more "schema-less" than Protocol Buffers, which can give it an advantage in flexibility but also a slight disadvantage in space efficiency (BSON has overhead for field names within the serialized data).
BSON was designed to have the following three characteristics:
-
Lightweight
-
Keeping spatial overhead to a minimum is important for any data representation format, especially when used over the network.
-
-
Traversable
-
BSON is designed to be traversed easily. This is a vital property in its role as the primary data representation for MongoDB.
-
-
Efficient
-
Encoding data to BSON and decoding from BSON can be performed very quickly in most languages due to the use of C data types.
-
출처 : http:bsonspec.org
이 글은 스프링노트에서 작성되었습니다.
'Software&Platform' 카테고리의 다른 글
Thrift (0) | 2011.12.16 |
---|---|
RPC (0) | 2011.12.15 |
MapReduce (0) | 2011.12.15 |
JSON (0) | 2011.05.30 |
REST (Representational State Transfer) (0) | 2011.05.17 |