aboutsummaryrefslogtreecommitdiffstats
path: root/jsonfactory.py
diff options
context:
space:
mode:
Diffstat (limited to 'jsonfactory.py')
-rw-r--r--jsonfactory.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/jsonfactory.py b/jsonfactory.py
new file mode 100644
index 0000000..7cb316c
--- /dev/null
+++ b/jsonfactory.py
@@ -0,0 +1,14 @@
+import json
+
+
+class JSONFactory(object):
+ @staticmethod
+ def make(text, user, timestamp, ip):
+ message = json.dumps({
+ "text": text,
+ "user": user,
+ "timestamp": timestamp,
+ "ip": ip
+ })
+
+ return message