Alternative serialization method.