File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 7
7
import json
8
8
import re
9
9
import requests
10
+ from xmljson import badgerfish as bf
11
+ from json import dumps
10
12
11
13
12
14
class Loklak (object ):
@@ -54,6 +56,17 @@ def status(self):
54
56
return_to_user = {}
55
57
return json .dumps (return_to_user )
56
58
59
+ def xmlToJson (self , xmlData = None ):
60
+ """Converts XML to JSON as the service"""
61
+ jsonData = ''
62
+ if xmlData :
63
+ jsonData = dumps (bf .data (fromstring (xmlData )))
64
+ return jsonData
65
+
66
+ def csvToJson (self ):
67
+ """Converts CSV to JSON as the service"""
68
+
69
+
57
70
def hello (self ):
58
71
"""Gives a hello"""
59
72
hello_application = 'api/hello.json'
Original file line number Diff line number Diff line change 1
1
asyncoro == 3.5
2
2
requests == 2.8.1
3
3
wsgiref == 0.1.2
4
+ xmljson == 0.1.6
5
+
You can’t perform that action at this time.
0 commit comments