Skip to content

Commit 805f5b7

Browse files
committed
Fixes #93: Fix bug in csvToJson method.
1 parent ea5f8fc commit 805f5b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

loklak.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ def xmlToJson(self, xmlData = None):
8080

8181
def csvToJson(self, csvData = None, fieldnamesList = None):
8282
"""Convert CSV to JSON as the service."""
83-
jsonData = ''
83+
jsonData = '[]'
8484
if csvData:
8585
data = csv.DictReader( csvData, fieldnames = fieldnamesList)
8686
jsonData = json.dumps( [ row for row in data ] )
87-
return out
87+
return jsonData
8888

8989
def hello(self):
9090
"""Retrieve a json response about the basic status of the server."""

0 commit comments

Comments
 (0)