-2

How to use the Twitter api using C#. I am not able to get any useful information.

vtammy
  • 115
  • 2
  • 8

1 Answers1

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