Switch to serializing with Marshal.