diff options
-rw-r--r-- | eteutils/StringTemplater.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/eteutils/StringTemplater.py b/eteutils/StringTemplater.py index 680600f..36ddfab 100644 --- a/eteutils/StringTemplater.py +++ b/eteutils/StringTemplater.py @@ -1,3 +1,4 @@ +import json from string import Template class StringTemplater: @@ -5,4 +6,8 @@ class StringTemplater: def template_string(self, template, values): """Template String takes in a string and its values and converts it using the string.Template class""" - return Template(template).substitute(values)
\ No newline at end of file + return Template(template).substitute(values) + + def string_Encoder(self,data): + data = json.dumps(data) + return data
\ No newline at end of file |