public static Pin Parse(JObject obj, bool deptParse = false) { if (obj == null) return null; Pin item = new Pin(); item.pin_id = obj.GetObject<string>("pin_id"); item.user_id = obj.GetObject<string>("user_id"); item.board_id = obj.GetObject<string>("board_id"); item.file_id = obj.GetObject<string>("file_id"); item.seq = obj.GetObject<string>("seq"); item.media_type = obj.GetObject<string>("media_type"); item.source = obj.GetObject<string>("source"); item.link = obj.GetObject<string>("link"); item.raw_text = HtmlDecode(obj.GetObject<string>("raw_text")); item.via = obj.GetObject<string>("via"); item.original = obj.GetObject<string>("original"); item.created_at = obj.GetObject<string>("created_at"); item.like_count = obj.GetObject<string>("like_count"); item.comment_count = obj.GetObject<string>("comment_count"); item.repin_count = obj.GetObject<string>("repin_count"); item.orig_source = obj.GetObject<string>("orig_source"); item.file = ImageFile.Parse(obj["file"] as JObject); item.liked = obj.GetObject<bool>("liked"); item.user = User.Parse(obj["user"] as JObject); item.board = Board.Parse(obj["board"] as JObject); if (deptParse) { item.repins = Pin.ParseList(obj["repins"] as JArray, false); item.comments = Comment.ParseList(obj["repins"] as JArray, false); item.likes = User.ParseList(obj["likes"] as JArray, false); } return item; }