<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36:23 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[GODRIVER-1438] Separate RegisterEncoder/Decoder functions to &quot;types&quot; and &quot;hooks&quot;</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1438</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;If an encoder is registered for an interface type, we&apos;ll call that encoder for all types that implement that interface as well. This was done so we could register encoders for types like &lt;tt&gt;bson.Marshaler&lt;/tt&gt; and they would be called for all structs that implement &lt;tt&gt;bson.Marshaler&lt;/tt&gt;. Users may want more fine-grained behavior, however. If an encoder is registered for &lt;tt&gt;io.Reader&lt;/tt&gt;, a user may only want it to be called when marshalling an &lt;tt&gt;io.Reader&lt;/tt&gt; and use the regular struct codec when marshalling a concrete type that implements &lt;tt&gt;io.Reader&lt;/tt&gt;. The proposed way to do this is the following:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Deprecate &lt;tt&gt;RegisterEncoder&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Add a new function to register a type encoder. In the case of interface types, the encoder will only be called when marshalling the interface type, not a concrete type that implements it.&lt;/li&gt;
	&lt;li&gt;Add a new function to register a &quot;hook&quot; encoder. This will only accept interface types and the encoder will be called for any types that implement the interface. We&apos;ll use this for interfaces like &lt;tt&gt;bson.Marshaler&lt;/tt&gt;&#160;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Everything listed above applies to decoders as well.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1050125">GODRIVER-1438</key>
            <summary>Separate RegisterEncoder/Decoder functions to &quot;types&quot; and &quot;hooks&quot;</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="divjot.arora@mongodb.com">Divjot Arora</assignee>
                                    <reporter username="divjot.arora@mongodb.com">Divjot Arora</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Dec 2019 15:46:59 +0000</created>
                <updated>Sat, 28 Oct 2023 11:38:24 +0000</updated>
                            <resolved>Wed, 8 Jan 2020 23:51:57 +0000</resolved>
                                                    <fixVersion>1.3.0</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2713133" author="xgen-internal-githook" created="Wed, 8 Jan 2020 23:50:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Divjot Arora&apos;, &apos;email&apos;: &apos;divjot.arora@10gen.com&apos;, &apos;username&apos;: &apos;divjotarora&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1438&quot; title=&quot;Separate RegisterEncoder/Decoder functions to &amp;quot;types&amp;quot; and &amp;quot;hooks&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1438&quot;&gt;&lt;del&gt;GODRIVER-1438&lt;/del&gt;&lt;/a&gt; Add separate RegistryBuilder methods for types and hooks (#269)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Deprecate RegisterEncoder and replace with RegisterTypeEncoder and RegisterHookEncoder&lt;/li&gt;
	&lt;li&gt;Deprecate RegisterDecoder and replace with RegisterTypeDecoder and RegisterHookDecoder&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/b29a995dc8af97d641cf244b00ba284c3220ce25&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/b29a995dc8af97d641cf244b00ba284c3220ce25&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                    <attachments>
                            <attachment id="240229" name="main.go" size="2046" author="divjot.arora@mongodb.com" created="Thu, 12 Dec 2019 16:08:01 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvrsj3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>