Serialize with Marshal instead of byte-slicing.