Commit b4bd4350 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Removed JSONMessage class because of inconsistency, use TextMessage instead

parent 59e0a6ba
...@@ -40,17 +40,6 @@ class BinaryMessage(Message): ...@@ -40,17 +40,6 @@ class BinaryMessage(Message):
super(BinaryMessage, self).__init__(OPCODE_BINARY, payload) super(BinaryMessage, self).__init__(OPCODE_BINARY, payload)
class JSONMessage(TextMessage):
def __init__(self, data={}, **kwargs):
self.data = {}
self.data.update(data, **kwargs)
super(JSONMessage, self).__init__(json.dumps(self.data))
@classmethod
def decode(cls, payload):
return cls(json.loads(payload))
def create_message(opcode, payload): def create_message(opcode, payload):
if opcode == OPCODE_TEXT: if opcode == OPCODE_TEXT:
return TextMessage(payload) return TextMessage(payload)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment