Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -131,9 +131,15 @@ def parse_json(inp):
|
|
131 |
print("Extracted Lines")
|
132 |
print(inp)
|
133 |
try:
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
return out1,out2
|
138 |
except Exception as e:
|
139 |
print(e)
|
|
|
131 |
print("Extracted Lines")
|
132 |
print(inp)
|
133 |
try:
|
134 |
+
start_file=inp.find('filename') + 11
|
135 |
+
name_file=inp.find(',', start_file)
|
136 |
+
out1 = inp[start_file,name_file]
|
137 |
+
end_file=inp.find('filecontent') + 14
|
138 |
+
out2 = inp[end_file]
|
139 |
+
#out1=inp.split('"filename":')[1]
|
140 |
+
#out_json=json.loads([inp][0])
|
141 |
+
#out1=str(out_json['filename'])
|
142 |
+
#out2=str(out_json['filecontent'])
|
143 |
return out1,out2
|
144 |
except Exception as e:
|
145 |
print(e)
|