Rewrite and custom serializer and custom deserializer support