Types » History » Version 2
J. Moringen, 03/18/2011 02:32 PM
added proposal for structured data
1 | 1 | J. Moringen | h1. Types |
---|---|---|---|
2 | 1 | J. Moringen | |
3 | 1 | J. Moringen | h2. Wire Schema <-> Programming Language Types Mapping |
4 | 1 | J. Moringen | |
5 | 2 | J. Moringen | h3. Fundamental Types |
6 | 2 | J. Moringen | |
7 | 1 | J. Moringen | For "fundamental" types, the mapping is based on "the type mapping used by Google's protocol buffers":http://code.google.com/apis/protocolbuffers/docs/proto.html#scalar. |
8 | 1 | J. Moringen | |
9 | 1 | J. Moringen | |_.Wire Schema |_.String Designator |_.C++ |_.Python |_.Java |_.Common Lisp | |
10 | 1 | J. Moringen | | Double precision float | "double" | double | | double | double-float | |
11 | 1 | J. Moringen | | Single precision float | "float" | float | float | float | single-float | |
12 | 1 | J. Moringen | | 32 bit signed integer | "int32" | int32 | | int | (signed-byte 32) | |
13 | 1 | J. Moringen | | 64 bit signed integer | "int64" | int64 | | long | (signed-byte 64) | |
14 | 1 | J. Moringen | | 32 bit unsigned integer | "uint32" | uint32 | | int | (unsigned-byte 32) | |
15 | 1 | J. Moringen | | 64 bit unsigned integer | "uint64" | uint64 | | long | (unsigned-byte 32) | |
16 | 1 | J. Moringen | | bool | "bool" | bool | bool | boolean | boolean | |
17 | 1 | J. Moringen | | UTF-8 string | "string" | string | str | String | string | |
18 | 1 | J. Moringen | | Sequence of Bytes | "bytes" | string | | ByteString | (simple-array (unsigned-byte 8) (*)) | |
19 | 2 | J. Moringen | |
20 | 2 | J. Moringen | h3. Structured Data |
21 | 2 | J. Moringen | |
22 | 2 | J. Moringen | _This section is just a proposal._ |
23 | 2 | J. Moringen | |
24 | 2 | J. Moringen | For structured data types using more sophisticated serialization mechanisms, the resulting wire schemas could be designated by something like @MECHANISM:MECHANISM-SPECIFIC-DESIGNATOR@. For example |
25 | 2 | J. Moringen | <pre> |
26 | 2 | J. Moringen | protocol-buffer:.rst.ImageMessage |
27 | 2 | J. Moringen | boost_serialization:sound::pcm::Buffer |
28 | 2 | J. Moringen | </pre> |