Answer the question
In order to leave comments, you need to log in
c# how to work with json get request?
I work with vk api, when you click on the button, the following code is executed:
using (var request = new HttpRequest())
{
var urlParams = new RequestParams();
string response = request.Get("https://api.vk.com/method/messages.getLastActivity?user_id=id&v=5.52&access_token=tokenc").ToString();
string content = response.ToString();
dynamic json = JObject.Parse(content);
}
"{\"response\":{\"online\":0,\"time\":1595229881}}"
{{
"response": {
"online": 0,
"time": 1595229881
}
}}
Answer the question
In order to leave comments, you need to log in
They returned normal correct JSON to you, and you broke it.
Then I form it into normal json and
get:
{{
"response": {
"online": 0,
"time": 1595229881
}
}}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question