I'm trying to figure out how to split a JSON file from one line into a multiliner, after each comma.
I've tried using the division method, but it's not yet the output I'm looking for. This is how far I have come so far.
with open (& # 39; api.txt & # 39 ;, & # 39; w + & # 39;) as f: api = res.read (). decode (& # 39; utf-8 & # 39;) f.write (api) new_api = str (api) .split (",") with open (& # 39; new_api.txt & # 39 ;, & # 39; w + & # 39;) as n: n.write (new_api)
I would like a result like this:
line1 "language": null
line2 "has_issues": true
line3 "has_projects": true
line4 "has_downloads": true
line5 "has_wiki": true
line6 "has_pages": false