persist metadata using object serialization