I have trouble using Regex to split a text file of JSON objects into string. The array of JSON objects are downloaded from an url and is meant to be processed by some javascript function. But I want to read them in C#. I have downloaded the file and just need to split it into individual JSON objects. The format of the text file is:
{......},{"S":...}
So I want to split it into a string[] so each JSON object is a string:
{"S":...}
{"S":...}
{"S":...}
{"S":...}
I want to leave out the comma that separates them in the original text file.
string[] jsons = Regext.Split(txtfile, "\{\"S\":");
But this doesn't work. How can I split it correctly?