diff --git a/Elements/src/Serialization/JSON/JsonInheritanceConverter.cs b/Elements/src/Serialization/JSON/JsonInheritanceConverter.cs index d240af76e..ad27c10d9 100644 --- a/Elements/src/Serialization/JSON/JsonInheritanceConverter.cs +++ b/Elements/src/Serialization/JSON/JsonInheritanceConverter.cs @@ -353,12 +353,12 @@ private System.Type GetObjectSubtype(System.Type objectType, string discriminato // If it's not in the type cache see if it's got a representation. // Import it as a GeometricElement. - if (jObject.TryGetValue("Representation", out _)) + if (jObject.TryGetValue("Representation", out _) && discriminator != null) { return typeof(GeometricElement); } // If nothing else has worked, see if it has an ID and treat it as a generic element - if (jObject.TryGetValue("Id", out _)) + if (jObject.TryGetValue("Id", out _) && discriminator != null) { return typeof(Element); }