I'm scraping resources in python and I want to make a json file, using it in Openrefine to clean data.
Here's my code:
import json
import codecs
A = xpath
B = xpath
C = xpath
D = xpath
with codecs.open('info2.json', 'a', 'utf-8-sig') as f:
json.dump({'A': A, 'B': B, 'C': C, 'D': D}, f, sort_keys=True, indent=4, ensure_ascii=False)
It's all right until I'll upload the file in Openrefine: I can't click on the right node, but only on a specific element. Here's an example:
I think there's an error producing the json with python, I tryed putting two {{}} but it gives me a "dict" error, so I tryed putting elements into arrays but nothing worked.
As request, here is a part of the json:
p.s. I'm using codecs because there are non-latin characters