<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:34:30 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-577] Add struct tags to choose BSON types</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-577</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The new bsoncodec package handles encoding and decoding of known types, but it doesn&apos;t handle encoding known types to their non-default BSON types. For instance, while decoding into an int64 for a DateTime type could be supported, there wouldn&apos;t be a way to properly encode the int64 to a DateTime BSON type. This violates the ability to round trip types in the BSON library and it causes information loss by default. For this reason, the BSON decoders do not currently support decoding a DateTime into an int64. Users who need this functionality required to register custom codecs to handle this case, or to handle BSON marshaling on their own.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;A better solution is to allow users to tag their struct values with a &lt;tt&gt;bsontype&lt;/tt&gt; struct field. This would allow the user to pass information to the encoders and decoders so they can properly handle round trip enabled encoding and decoding without information loss for non standard BSON types. This would enable users to encode a string to essentially any BSON type and also decode it. This is especially useful for ObjectIDs and date time strings.&lt;/p&gt;</description>
                <environment></environment>
        <key id="607518">GODRIVER-577</key>
            <summary>Add struct tags to choose BSON types</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="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="kris.brandow@mongodb.com">Kristofer Brandow</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Sep 2018 13:32:43 +0000</created>
                <updated>Mon, 10 Oct 2022 20:27:33 +0000</updated>
                                                                            <component>BSON</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3963432" author="JIRAUSER1261343" created="Mon, 26 Jul 2021 17:45:36 +0000"  >&lt;p&gt;Another scenario:&lt;br/&gt;
We want to keep mongo in our storage layer and abstract mongo away from our business logic. So to our business logic, an ID is a string, but internally that string is converted to/from a BSON ObjectID.&lt;/p&gt;

&lt;p&gt;I have copied and modified bsoncodec/struct_codec.go to support our own custom `bsoncodec` struct tag, but I like the proposed `bsontype` paradigm.&lt;/p&gt;

&lt;p&gt;I would be happy to do a pull request if someone could point the way.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="606314">GODRIVER-565</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6k64:3zz</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>