diff --git a/loklak.py b/loklak.py index 0b2a461..84fc666 100644 --- a/loklak.py +++ b/loklak.py @@ -80,11 +80,11 @@ def xmlToJson(self, xmlData = None): def csvToJson(self, csvData = None, fieldnamesList = None): """Convert CSV to JSON as the service.""" - jsonData = '' + jsonData = '[]' if csvData: data = csv.DictReader( csvData, fieldnames = fieldnamesList) jsonData = json.dumps( [ row for row in data ] ) - return out + return jsonData def hello(self): """Retrieve a json response about the basic status of the server."""