When using on-the-fly schema creation, by default all types that do not have
will crash (and not very nicely when the object is a child of the object being deserialized).
There is already a property
, which achieves the same thing; also, using
requires referencing Microsoft.Avro.dll and Newtonsoft.Json.dll in multiple Model assemblies that would otherwise not need it.
I suggest (and can provide a pull request) using
, though this would break existing code (well, not break it but introduce Nullable fields where not needed). To that effect, maybe there could be a setting in
Let me know your throughts!
For people who search for keywords like I did, here is the errors I get:
System.Runtime.Serialization.SerializationException : Unexpected null value for the object of type 'MyType'. Please check the schema.
and this for children objects, without other details:
System.ArgumentNullException : Value cannot be null.
Parameter name: value