Using serialization for persisting rules