MessagePack encoder for types conforming to Swift 4's Encodable protocol msgpack.org[Swift-4]
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
MsgPack.xcodeproj
MsgPack
MsgPackTests
Playground.playground
Workspace.xcworkspace
.gitignore
LICENSE.txt
README.md

README.md

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.