public void WillGetValueFromJsonDictionary()
 {
     var dictionary = new Dictionary<string, object>
     {
         {"key1", new Dictionary<string, object> {{"_content", "value1"}}},
         {"key2", new Dictionary<string, object> {{"_content", "value2"}}}
     };
     Assert.AreEqual("value1", dictionary.GetSubValue("key1"));
     Assert.AreEqual("value2", dictionary.GetSubValue("key2"));
 }
 private static Photo BuildPhoto(Dictionary<string, object> dictionary)
 {
     return new Photo(dictionary.GetValue("id").ToString(),
         dictionary.GetValue("owner").ToString(),
         dictionary.GetValue("secret").ToString(),
         dictionary.GetValue("server").ToString(),
         Convert.ToInt32(dictionary.GetValue("farm")),
         dictionary.GetValue("title").ToString(),
         Convert.ToBoolean(dictionary.GetValue("ispublic")),
         Convert.ToBoolean(dictionary.GetValue("isfriend")),
         Convert.ToBoolean(dictionary.GetValue("isfamily")),
         dictionary.GetSubValue("description").ToString().Trim(),
         dictionary.GetValue("tags").ToString(),
         dictionary.GetValue("originalsecret").ToString(),
         dictionary.GetValue("originalformat").ToString(),
         dictionary.GetValue("url_sq").ToString(),
         dictionary.GetValue("url_q").ToString(),
         dictionary.GetValue("url_t").ToString(),
         dictionary.GetValue("url_s").ToString(),
         dictionary.GetValue("url_n").ToString(),
         dictionary.GetValue("url_m").ToString(),
         dictionary.GetValue("url_z").ToString(),
         dictionary.GetValue("url_c").ToString(),
         dictionary.GetValue("url_l").ToString(),
         dictionary.GetValue("url_o").ToString());
 }
 private static Photoset BuildPhotoset(Dictionary<string, object> dictionary) {
     return new Photoset(dictionary.GetValue("id").ToString(),
         dictionary.GetValue("primary").ToString(),
         dictionary.GetValue("secret").ToString(),
         dictionary.GetValue("server").ToString(),
         int.Parse(dictionary.GetValue("farm").ToString()),
         int.Parse(dictionary.GetValue("photos").ToString()),
         int.Parse(dictionary.GetValue("videos").ToString()),
         dictionary.GetSubValue("title").ToString(),
         dictionary.GetSubValue("description").ToString(),
         PhotosetType.Album, null);
 }