jsonEditor将无法正确绑定到jSON对象

时间:2017-05-23 08:20:02

标签: asp.net json

考虑以下对象:

 public class Restrictions
    {
        public Restrictions()
        {
            RestrictedTo = new List<RateRestrictionMembershipModel>();
        }
        public RateRestrictionType RateRestrictionType { get;set;}

        public bool HasRestriction => RestrictedTo.Any();
        public bool IsExclusive { get; set; }
        public List<RateRestrictionMembershipModel> RestrictedTo { get; set; }
    }


    public class RateRestrictionMembershipModel
    {
        public RateRestrictionMembershipModel()
        {

        }
        public string Title { get; set; }
        public string MembershipId { get; set; }
    }
}

通过jsonEditor访问它无法按预期方式工作。 出于某种原因,包含2个字符串道具的最深物体 RateRestrictionMembershipModel 不会被识别为对象成员:

enter image description here

0 个答案:

没有答案