Creating a custom response serializer