I'm trying to serialize types (e.g. ZonedDateTime) from the NodaTime library which are marked as ISerializable (source), though also contain non-serializable fields. When generating a pickler using:
let p : Nessos.FsPickler.Pickler<NodaTime.OffsetDateTime> = Nessos.FsPickler.FsPickler.GeneratePickler()
it throws NonSerializableTypeException: Type 'NodaTime.OffsetDateTime' contains non-serializable field of type 'NodaTime.CalendarSystem'.
Should FsPickler prefer the ISerializable implementation over field based serialization? Alternatively, should we encourage NodaTime to support DataContract based serialization instead?
I'm trying to serialize types (e.g. ZonedDateTime) from the NodaTime library which are marked as ISerializable (source), though also contain non-serializable fields. When generating a pickler using:
it throws NonSerializableTypeException: Type 'NodaTime.OffsetDateTime' contains non-serializable field of type 'NodaTime.CalendarSystem'.
Should FsPickler prefer the ISerializable implementation over field based serialization? Alternatively, should we encourage NodaTime to support DataContract based serialization instead?