How to use the Twitter api using C#. I am not able to get any useful information.
Asked
Active
Viewed 209 times
1 Answers
1
You can us JsonConvert.Deserialize(string json) to deserialize a string to a class type.
MyType x = JsonCOnvert.Deserialize<MyType>(someJsonString);
Or if there isn't a type, you can convert it to a JObject and dynamically pull the properties:
JObject x = JObject.Parse(someJsonString);
dynamic json = x;
string url = json.city;

Mike_G
- 16,237
- 14
- 70
- 101
-
Here, what is MyType. – vtammy Feb 12 '15 at 21:20
-
JObject x = JObject.Parse(someJsonString); dynamic json = x; string url = json.city; the url is empty string – vtammy Feb 12 '15 at 21:23