diff --git a/Octokit/SimpleJson.cs b/Octokit/SimpleJson.cs index 9266c3dc..36a1688f 100644 --- a/Octokit/SimpleJson.cs +++ b/Octokit/SimpleJson.cs @@ -1773,7 +1773,17 @@ namespace Octokit public static IEnumerable GetProperties(Type type) { #if SIMPLE_JSON_TYPEINFO - return type.GetTypeInfo().DeclaredProperties; + var typeInfo = type.GetTypeInfo(); + var properties = typeInfo.DeclaredProperties; + + if (typeInfo.BaseType == null) + return properties; + + if (typeInfo.BaseType.FullName == typeof (Object).FullName) + return properties; + + var baseProperties = GetProperties(typeInfo.BaseType); + return System.Linq.Enumerable.Concat(properties, baseProperties); #else return type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); #endif