using Newtonsoft.Json.Linq;
public static void Main()
""last_name"": ""Westfield"",
""email"": ""nik@youremail.com"",
""is_silhouette"": false,
""url"": ""https://scontent.xx.fbcdn.net/v/t1.0-1/p720x720/3221....."",
FacebookMeDto me = JsonConvert.DeserializeObject<FacebookMeDto>(json);
Console.WriteLine("height: " + me.PictureDto.Height);
Console.WriteLine("url: " + me.PictureDto.Url);
public class FacebookMeDto
public string Id { get; set; }
[JsonProperty("picture")]
[JsonConverter(typeof(FacebookPictureDtoConverter))]
public FacebookPictureDto PictureDto { get; set; }
public class FacebookPictureDto
public int Height { get; set; }
public string Url { get; set; }
public class FacebookPictureDtoConverter : JsonConverter
public override bool CanConvert(Type objectType)
return objectType == typeof(FacebookPictureDto);
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
JObject obj = JObject.Load(reader);
FacebookPictureDto dto = new FacebookPictureDto();
serializer.Populate(obj["data"].CreateReader(), dto);
public override bool CanWrite
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
throw new NotImplementedException();