rewrite reflection serialization