Skip to content

Msgpack Driver

Anders Peter Fugmann edited this page Apr 15, 2019 · 3 revisions

Msgpack

Msgpack driver maps to and from Msgpck.t. To allow more fine grained control over generated type, the msgpack module defines extra types. See table in #types section. Package ppx_protocol_conv_msgpack

Options

The module Also provides means for changing default attribute behavior and record field naming conventions, by using the functor Msgpack.Make(P:Parameters)

Types

Ocaml type Generates Accepts
string String String, Bytes
bytes Bytes String, Bytes
char String String, Bytes
int Int Int, Int32, Int64, Uint32, Uint64
int32 Int32 Int32
nativeint Nativeint Int, Int32, Int64, Uint32, Uint64
float Float64 Float64, Float32
unit List [] List []
bool Bool Bool
'a list, 'a array List 'a list `List 'a list
'a option Nil or 'a Nil or 'a
'a ref, lazy 'a 'a 'a
Msgpack.uint32 Uint32 Uint32
Msgpack.uint64 Uint64 Uint64
Msgpack.bytes Bytes Bytes, String
Msgpack.float32 Float32 Float32
Msgpack.t MsgPck.t MsgPck.t
Clone this wiki locally