Abstract serialization