During using BeaverDam to collect data, I faced the problem that the annotation cannot be seen in the browser even though it can be before accept/reject worker's submission.
I finally found the solution:
change data['updated_annotations'] to json.dumps(data['updated_annotations']) in
|
data['updated_annotations']) |
and
|
data['updated_annotations']) |
.
In most cases, the orignal works well, but when the text includes both of " and ', error will occur when parsing annotation such as below.
JSONDecodeError: Expecting property name enclosed in double quotes
We need to make sure make the string is json compatible.
I would appreciate If someone fixes it.
Thanks,
During using BeaverDam to collect data, I faced the problem that the annotation cannot be seen in the browser even though it can be before accept/reject worker's submission.
I finally found the solution:
change
data['updated_annotations']tojson.dumps(data['updated_annotations'])inBeaverDam/annotator/views.py
Line 230 in 3e10553
and
BeaverDam/annotator/views.py
Line 236 in 3e10553
.
In most cases, the orignal works well, but when the text includes both of " and ', error will occur when parsing annotation such as below.
JSONDecodeError: Expecting property name enclosed in double quotesWe need to make sure make the string is json compatible.
I would appreciate If someone fixes it.
Thanks,