Edit serialization logic