Creates a new instance of this class with the given function that performs the custom serialization.
the delegate to call when performing custom serialization
See Implementation
Creates a new instance of this class with the given function that performs the custom serialization.