Create json in python for Openrefine -


i'm scraping resources in python , want make json file, using in openrefine clean data.

here's code:

import json import codecs  = xpath b = xpath c = xpath d = xpath  codecs.open('info2.json', 'a', 'utf-8-sig') f:     json.dump({'a': a, 'b': b, 'c': c, 'd': d}, f, sort_keys=true, indent=4, ensure_ascii=false) 

it's right until i'll upload file in openrefine: can't click on right node, on specific element. here's example:

i can click on specific element

i think there's error producing json python, tryed putting 2 {{}} gives me "dict" error, tryed putting elements arrays nothing worked.

as request, here part of json:

enter image description here

p.s. i'm using codecs because there non-latin characters

to make node selectable in openrefine import need enclose array in node - e.g.

{   "distribution": [     "jhu",     "123"   ],   "immagine": {     "immaginelist": [       "1",       "2",       "3"     ]   } } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -