Add example to readme

This commit is contained in:
Damiaan Dufaux 2017-08-02 17:34:15 +02:00
parent 4c1c7937f5
commit c57ed19c62
2 changed files with 11 additions and 2 deletions

View file

@ -1,7 +1,6 @@
//: Playground - noun: a place where people can play
import MsgPack
import Foundation
let encoder = Encoder()

View file

@ -1,3 +1,13 @@
# Usage
Take a look at the [playground](Playground.playground/Contents.swift)
```swift
import MsgPack
let encoder = Encoder()
try encoder.encode("Hello world")
try encoder.encode("😇")
try encoder.encode(0x0102030405060708)
try encoder.encode(["Some strings", "in an array"])
```
Take a look at the [playground](Playground.playground/Contents.swift) for more examples.