Browse Source

Fix to allow rendering empty anonymous type

Brad Robinson 6 years ago
parent
commit
02786166c5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      PetaJson.cs

+ 1 - 1
PetaJson.cs

@@ -1945,7 +1945,7 @@ namespace PetaJson
                 }
 
                 // Must have some members
-                if (!members.Any())
+                if (!members.Any() && !Attribute.IsDefined(type, typeof(System.Runtime.CompilerServices.CompilerGeneratedAttribute), false))
                     return null;
 
                 // Create reflection info