BSON (Binary JSON): Specification

- 编辑:admin -

BSON (Binary JSON): Specification

etc. locale dependent, 's' for dotall mode ('.' matches everything), which must be stored in alphabetical order. Valid options are 'i' for case insensitive matching,。

\W, 'l' to make \w, and 'u' to make \w, the second is the regex options string. Options are identified by characters, 'm' for multiline matching, hence it is not full UTF-8. binary ::= int32 subtype (byte*) Binary - The int32 is the number of bytes in the (byte*). subtype ::= "\x00" Generic binary subtype | "\x01" Function | "\x02" Binary (Old) | "\x03" UUID (Old) | "\x04" UUID | "\x05" MD5 | "\x80" User defined code_w_s ::= int32 string document Code w/ scope 。

document ::= int32e_list"\x00" BSON Document. int32 is the total number of bytes comprising the document. e_list ::= element e_list | "" element ::= "\x01" e_name double 64-bit binary floating point | "\x02" e_name string UTF-8 string | "\x03"e_namedocument Embedded document | "\x04" e_name document Array | "\x05" e_name binary Binary data | "\x06" e_name Undefined (value) Deprecated | "\x07" e_name (byte*12) ObjectId | "\x08" e_name "\x00" Boolean "false" | "\x08" e_name "\x01" Boolean "true" | "\x09" e_name int64 UTC datetime | "\x0A" e_name Null value | "\x0B" e_name cstring cstring Regular expression - The first cstring is the regex pattern, \W, 'x' for verbose mode, etc. match unicode. | "\x0C" e_name string (byte*12) DBPointer Deprecated | "\x0D" e_name string JavaScript code | "\x0E" e_name string Symbol. Deprecated | "\x0F" e_name code_w_s JavaScript code w/ scope | "\x10" e_name int32 32-bit integer | "\x11" e_name uint64 Timestamp | "\x12" e_name int64 64-bit integer | "\x13" e_name decimal128 128-bit decimal floating point | "\xFF" e_name Min key | "\x7F" e_name Max key e_name ::= cstring Key name string ::= int32(byte*)"\x00" String - The int32 is the number bytes in the (byte*) + 1 (for the trailing '\x00'). The (byte*) is zero or more UTF-8 encoded characters. cstring ::= (byte*) "\x00" Zero or more modified UTF-8 encoded characters followed by '\x00'. The (byte*) MUST NOT contain '\x00'。