/// <summary> /// Override FromJSON /// </summary> /// <param name="obj"></param> /// <returns></returns> public override CindyModel FromJSON(dynamic obj) { return(new Star() { Id = obj.id, Value = obj.value, Mondai = CindyModel.FromJSON(obj.mondai_id, ModelType.Mondai) }); }
/// <summary> /// Override FromJSON /// </summary> /// <param name="obj"></param> /// <returns></returns> public override CindyModel FromJSON(dynamic obj) { try { return(new Comment() { Id = obj.id, Content = obj.content, SenderName = obj.user_id.nickname, Mondai = CindyModel.FromJSON(obj.mondai_id, ModelType.Mondai) }); } catch { throw new ArgumentException("Invalid type"); } }