考虑以下对象:
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 不会被识别为对象成员: