json encoder

This commit is contained in:
Julien Hebert 2013-02-17 21:10:21 +01:00 committed by Laurent Bachelier
commit 8d8fe9090f
2 changed files with 46 additions and 1 deletions

View file

@ -25,7 +25,7 @@ class FormatterLoadError(Exception):
pass
class FormattersLoader(object):
BUILTINS = ['htmltable', 'multiline', 'simple', 'table', 'csv', 'webkit']
BUILTINS = ['htmltable', 'multiline', 'simple', 'table', 'csv', 'webkit', 'json']
def __init__(self):
self.formatters = {}
@ -71,3 +71,6 @@ class FormattersLoader(object):
elif name == 'csv':
from .csv import CSVFormatter
return CSVFormatter
elif name == 'json':
from .json import JsonFormatter
return JsonFormatter