add an introspective serializer to an object