diff --git a/README.md b/README.md index 0c37980..52f64d6 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,12 @@ socket.on("connect") {data in "data": true ]) } + +socket.on("foobar") {data in + if let json = socket.toJSON(data) { + println(json["test"]) + } +} socket.connect() ```