@apollo13 
``serializers.serialize`` call ``getvalue()``, and while serializing the final object data received is in the form of ``dict``. Then ``dump()`` function is called which converts this dict objects into ``str`` and writes it onto the stream.