mirror of
https://github.com/Dev1an/MsgPack.git
synced 2026-03-25 08:45:55 +00:00
Add example to readme
This commit is contained in:
parent
4c1c7937f5
commit
c57ed19c62
2 changed files with 11 additions and 2 deletions
|
|
@ -1,7 +1,6 @@
|
|||
//: Playground - noun: a place where people can play
|
||||
|
||||
import MsgPack
|
||||
import Foundation
|
||||
|
||||
let encoder = Encoder()
|
||||
|
||||
|
|
|
|||
12
README.md
12
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.
|
||||
Loading…
Reference in a new issue