<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:22 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-2788] Consider adding a &quot;strict&quot; BSON decode option that disallows most/all type conversion</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2788</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;Currently the Go driver BSON decoder will decode many types, including BSON booleans, into Go booleans. The current rules are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;BSON boolean - Match the BSON boolean value.&lt;/li&gt;
	&lt;li&gt;BSON int32 - Any non-zero value is Go &lt;tt&gt;true&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;BSON int64 - Any non-zero value is Go &lt;tt&gt;true&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;BSON double - Any non-zero value is Go &lt;tt&gt;true&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;BSON null - Always Go &lt;tt&gt;false&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;BSON undefined - Always Go &lt;tt&gt;false&lt;/tt&gt;.&lt;br/&gt;
Check out an example &lt;a href=&quot;https://go.dev/play/p/zZJnu_hsKfz&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;However, other drivers for statically typed languages (e.g. Rust) only allow strict BSON boolean -&amp;gt; native boolean decoding. Update the Go behavior to default to strict BSON boolean -&amp;gt; Go boolean decoding. Add a decoder option that enables &quot;strict&quot; decoding that prevents implicit type conversion.&lt;/p&gt;

&lt;p&gt;Open questions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Should we keep the existing behavior as the default and add a configuration option that only allows strict value type assignment? Or should we update the default to be strict?&lt;/li&gt;
	&lt;li&gt;Should we also disallow implicit type conversion for numeric types?&lt;/li&gt;
	&lt;li&gt;What motivated this?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Definition of done:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Add an option to &lt;tt&gt;bson.Decoder&lt;/tt&gt; that requires &quot;strict&quot; BSON -&amp;gt; Go type decoding behavior.
	&lt;ul&gt;
		&lt;li&gt;What types should this apply to? Boolean only? Integer and float also?&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="2303909">GODRIVER-2788</key>
            <summary>Consider adding a &quot;strict&quot; BSON decode option that disallows most/all type conversion</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Mar 2023 19:56:54 +0000</created>
                <updated>Mon, 8 Jan 2024 21:09:08 +0000</updated>
                                                                            <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <attachments>
                    </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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>GODRIVER-2973</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6jqv:s0000yzi</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>