I am giving a try in backend and I am failing in parsing Twitters stream API. I want to create Json file with timestamp, name, tweet and screen name. That seems to be working. But when I try to write it in file - entry overwrites already existing one. It does not continues. I red here that for some outfile.write('\n')
worked. Tried and still new entry overwrites previous one
with open('text2', 'w') as outfile:
json.dump({'time': time.time(), 'screenName': screenName, 'text': text, 'name': name}, outfile, indent = 4, sort_keys=True)
outfile.write('\n')