No description
Find a file
2017-08-02 17:37:10 +02:00
MsgPack Move format code back to format file 2017-08-02 17:27:49 +02:00
MsgPack.xcodeproj Encode keyed containers 2017-08-02 12:20:42 +02:00
MsgPackTests Encode arrays 2017-08-02 17:24:20 +02:00
Playground.playground Add example to readme 2017-08-02 17:34:15 +02:00
Workspace.xcworkspace Add readme 2017-07-31 14:04:45 +02:00
.gitignore Encode keyed containers 2017-08-02 12:20:42 +02:00
README.md Add custom type to readme 2017-08-02 17:37:10 +02:00

Usage

import MsgPack

// Encode standard types
let encoder = Encoder()
try encoder.encode("Hello world")
try encoder.encode("😇")
try encoder.encode(0x0102030405060708)
try encoder.encode(["Some strings", "in an array"])

// Encode custom types with Encodable 🎉
struct Point: Encodable {
  let x: Int
  let y: Int
}
try encoder.encode(Point(x: 90, y: 45))

Take a look at the playground for more examples.