Because of this issue here, I\'m trying to write a custom JsonConverter that handles cases where you subclass a list or a collection, then add extra properties to it. As such,
MemberInfo.DeclaringType should do what you need. To get members directly defined in type X filter the members by DeclaringType == typeof(X).
DeclaringType == typeof(X)