I had unknown encoding in a MS ACCESS data table because the text inputs originated by people copying and pasting from Word documents.
So when I attempted:
final_data_to_write = json.dumps(list_of_text_lines)
The error output was:
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 5: unexpected end of data"
Loop over the text lines and encode each one as follows: