aboutsummaryrefslogtreecommitdiffstats
path: root/jsonfactory.py
blob: 7cb316c43ef17518372ed9fd17c66d66680046aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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