Version 2.1.11

AllowDeserializeInvalidDataAttribute class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
public class AllowDeserializeInvalidDataAttribute : Attribute, _Attribute

Applying this attribute to a type indicates that in the case where, when expecting to deserialize an instance of the type or any of its derived types, but encountering an incompatible, uncastable type in the data being read, the serializer should attempt to deserialize an instance of the expected type using the stored, possibly invalid data.

This is equivalent to the AllowDeserializeInvalidData option, expect type-specific instead of global.

  • System.Object
  • System.Attribute
  • AllowDeserializeInvalidDataAttribute


public AllowDeserializeInvalidDataAttribute()