I have a text file that contains data that looks like this:
{\"_clientId\":\"123\",\"_timestamp\":22548}
{\"_clientId\":\"222\",\"_timestamp\":22590}
(they have escape characters already)
When I read the file using
string[] lines = System.IO.File.ReadAllLines(@"datafile.txt");
for example, it stores the strings in lines
as:
"{\\\"_clientId\\\":\\\"123\\\",\\\"_timestamp\\\":22548}"
"{\\\"_clientId\":\\\"222\\\",\\\"_timestamp\\\":22590}"
My question is: Is there a way to store them in the string variable without the additional escape characters (store them as they appeared in the file)?