Skip to content

Commit b622acc

Browse files
committed
Disable strict JSON parsing
1 parent f9b0b47 commit b622acc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pycorenlp/corenlp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ def annotate(self, text, properties=None):
1515
'properties': str(properties)
1616
}, data=text)
1717
output = r.text
18-
if ('outputFormat' in properties
18+
if ('outputFormat' in properties
1919
and properties['outputFormat'] == 'json'):
2020
try:
21-
output = json.loads(output)
21+
output = json.loads(output, strict=False)
2222
except:
2323
pass
2424
return output

0 commit comments

Comments
 (0)