2
I used the function replace
to replace single quotes from a field in csv with double quotes, but in output the value comes out with escape character , it is this character remains when clicking to hdts.
Codeline:
txt_situ_mens = linha_csv[11].replace("/'", "/'")
Archive at the entrance:
{'delivered': '2018-09-15 00:35:00+0000', 'read': '2018-09-15 00:35:00+0000', 'received': '2018-09-15 00:33:43+0000'}
Archive in the Saida:
{\"delivered\": \"2018-09-15 00:35:00+0000\", \"read\": \"2018-09-15 00:35:00+0000\", \"received\": \"2018-09-15 00:33:43+0000\"}
How would you like the file to come out: {"Delivered": '2018-09-15 00:35:00+0000", "read": "2018-09-15 00:35:00+0000", "Received": "2018-09-15 00:33:43+0000"}
I didn’t understand your question could elaborate better?
– Anderson Henrique
Yes, because what you’re exhibiting is a string and if the quote was not escaped it would break the syntax of the language:
"{"delivered": "2018-12-11", ...}"
– Woss
What would "load to hdts"?
– Woss