[adapters] Use an adapter for serializing entities to a bare python structure
which may be used for e.g. JSON export or other and allow to have different
serializations for each entity types.
Closes #6378035
===================
Changelog history
===================
.. include:: 3.22.rst
.. include:: 3.21.rst
.. include:: 3.20.rst
.. include:: 3.19.rst
.. include:: 3.18.rst
.. include:: 3.17.rst
.. include:: 3.16.rst
.. include:: 3.15.rst
.. include:: 3.14.rst