diff --git a/Playground.playground/Contents.swift b/Playground.playground/Contents.swift index 22cffcc..16d7a23 100644 --- a/Playground.playground/Contents.swift +++ b/Playground.playground/Contents.swift @@ -1,7 +1,6 @@ //: Playground - noun: a place where people can play import MsgPack -import Foundation let encoder = Encoder() diff --git a/README.md b/README.md index f5b9b15..5a0a618 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file