Support custom serialization of fay datatypes