msiemens This is my code. I read from a cvs and write to the Json:
dbTweets = TinyDB('/Users/lbeato/Documents/Doctorado/Codigo/Tweets.json', ensure_ascii=False)
with open('/Users/lbeato/Documents/Doctorado/Codigo/tweetslimpios.csv', 'rb') as csvfile:
rows = csv.reader(csvfile, delimiter=',', quotechar='"')
#This skips the first row of the CSV file.
next(rows)
for row in rows:
dbTweets.insert({'id': row[0], 'tweet': row[4],'emotion1': row[5]})
By the way...your code works fine.