K
K
Kirill Legend2020-02-11 19:25:21
C++ / C#
Kirill Legend, 2020-02-11 19:25:21

Error parsing a string via JObject.Parse(). How to fix?

Error parsing a string via JObject.Parse(). How to fix?

string pollData2 = builder.Append(reader2.ReadToEnd()).ToString(); // текст полученного https запроса
            Console.WriteLine(pollData2);
            JObject poolConnectJson2 = JObject.Parse(pollData2);

Response comes like:
{"response":{"key":"cd28018e33fb281960fa3851d15cc19ae2baf6da","server":"https:\/\/lp.vk.com\/wh190776459","ts":"5695"}}{ "ts":"5695","updates":[]}
Error text:
Newtonsoft.Json.JsonReaderException: "Additional text encountered after finished reading JSON content: {. Path '', line 1, position 119."

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2020-02-11
@thelegend3553

In the example, are there two answers or one?
If there is one, then it is an invalid json - there can only be one object at the top level.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question