diff options
Diffstat (limited to 'jsonfactory.py')
| -rw-r--r-- | jsonfactory.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/jsonfactory.py b/jsonfactory.py index 7cb316c..be70996 100644 --- a/jsonfactory.py +++ b/jsonfactory.py @@ -3,7 +3,7 @@ import json class JSONFactory(object): @staticmethod - def make(text, user, timestamp, ip): + def make_object(text, user, timestamp, ip): message = json.dumps({ "text": text, "user": user, @@ -12,3 +12,7 @@ class JSONFactory(object): }) return message + + @staticmethod + def make_array(object_list): + return "[\n" + ",\n".join(object_list) + "\n]" |
