<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword">open </span><spanclass="token keyword">override </span><spanclass="token keyword">fun </span><ahref="serialize.html"><spanclass="token function">serialize</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">encoder<spanclass="token operator">: </span><spandata-unresolved-link="kotlinx.serialization.encoding/Encoder///PointingToDeclaration/">Encoder</span><spanclass="token punctuation">, </span></span><spanclass="parameter ">value<spanclass="token operator">: </span><ahref="index.html">T</a></span></span><spanclass="token punctuation">)</span></div><pclass="paragraph">Trying to serialize data by <ahref="../../../tgbotapi.core/dev.inmo.tgbotapi.utils.serializers/-callback-customizable-serialization-strategy/default-serialize-callback.html">defaultSerializeCallback</a>. If <ahref="../../../tgbotapi.core/dev.inmo.tgbotapi.utils.serializers/-callback-customizable-serialization-strategy/default-serialize-callback.html">defaultSerializeCallback</a> it will try to use each strategy from <ahref="custom-serialization-strategies.html">customSerializationStrategies</a> until one of them will return true (means, serialized). If there are no any strategy success serialization and <ahref="../../../tgbotapi.core/dev.inmo.tgbotapi.utils.serializers/-callback-customizable-serialization-strategy/default-serialize-callback.html">defaultSerializeCallback</a> thrown exception will be used <ahref="../../../tgbotapi.core/dev.inmo.tgbotapi.utils.serializers/-callback-customizable-serialization-strategy/fallback-serialization.html">fallbackSerialization</a> callback</p></div></div>