From 805f5b71255db4e8a28dd584702338f4cc1f1873 Mon Sep 17 00:00:00 2001 From: YJDave Date: Thu, 25 Jan 2018 13:51:31 +0530 Subject: [PATCH] Fixes #93: Fix bug in csvToJson method. --- loklak.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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."""