I have a json file, large one. It has a structure like this:
[{"property":{"propertyID":85630,"name":"Curry Junction"}}]JSON_F52E2B61-18A1-11d1-B105-00805F49916B[{"property":{"propertyID":85630,"name":"Curry Junction"}}]
Now, I am trying to parse it or even split it. This json file is full of errors which is why I had to introduce custom convertors to help me. For example "prop\r\nerty" is like this and there are some spaces inside values. I was able to clean the file but problem is I am not able to find a way how to read second array with Newtonsoft. Right now I am hitting the error: >"Additional text encountered after finished reading JSON content: J. Path ''">
Is there a way to either deserialize this json file into proper object that I created? Can it be assumed that JSON_F52E2B61-18A1-11d1-B105-00805F49916B is some custom token, random one that can be ignored with code?
Here is the sample how I am doing deserialization:
using (StreamReader r = new StreamReader(fileName))
{
string json = r.ReadToEnd();
return JsonConvert.DeserializeObject<Property[]>(Regex.Replace(json, "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1"), new JsonSerializerSettings
{
Error = HandleDeserializationError,
Formatting = Formatting.None,
Converters = new List<JsonConverter> { new PropertyConverter() }
});
}