diff --git a/CHANGES/1412.doc.rst b/CHANGES/1412.doc.rst index e9ca6d14..0429dac3 100644 --- a/CHANGES/1412.doc.rst +++ b/CHANGES/1412.doc.rst @@ -1 +1 @@ -Added message serialisation and deserialization block in 2.x -> 3.x migration guide +Added telegram objects transformation block in 2.x -> 3.x migration guide diff --git a/docs/migration_2_to_3.rst b/docs/migration_2_to_3.rst index df966c36..2a5ee80b 100644 --- a/docs/migration_2_to_3.rst +++ b/docs/migration_2_to_3.rst @@ -151,9 +151,14 @@ Telegram API Server - The constant `aiogram.bot.api.TELEGRAM_PRODUCTION` has been moved to `aiogram.client.telegram.PRODUCTION`. -Message serialisation and deserialization +Telegram objects transformation (to dict, to json, from json) =========================================== -- Method :class:`Message.to_object()` and :class:`Message.to_json()` have been removed. :class:`Message.model_dump()` should be used - instead of :class:`Message.to_object()` and :class:`Message.model_dump_json()` instead of :class:`Message.to_json` due - to use of `pydantic `_ models. +- Methods :class:`TelegramObject.to_object()`, :class:`TelegramObject.to_json()` and :class:`TelegramObject.to_python()` + have been removed due to the use of `pydantic `_ models. +- :class:`TelegramObject.model_validate_json()` should be used instead of :class:`TelegramObject.to_object()` + (`Read more `_) +- :class:`TelegramObject.model_dump_json()` should be used instead of :class:`TelegramObject.as_json()` + (`Read more `_) +- :class:`TelegramObject.model_dump()` should be used instead of :class:`TelegramObject.to_python()` + (`Read more `_)