         case "room":
             
             // This message will be either a command or a chat
-            let json = JSON(message.payload)
+            guard let payloadJSON = (message.payload).data(using: String.Encoding.utf8) else {
+                //throw SwiftRoomError.errorInJSONProcessing
+                break;
+            }
+            
+            let json = JSON(data: payloadJSON)
+
             let content = json[Constants.Message.content].stringValue
             
             if let first = content.characters.first, first == "/" {

        let username = message.username ?? ""
        
        let target = message.target.rawValue

        switch target {
        case "roomHello":
            

            break;
        
        case "/look", "/examine":
            if let remainder = remainder, remainder.range(of: "room") == nil {
                try endpoint.sendMessage(connection: connection,
                                     message: Message.createSpecificEvent(userId: userId, messageForUser: Constants.Room.lookUnknown))
