<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:34:08 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-401] Support `json:&quot;-&quot;` tags in the bson encoder</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-401</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;Protobuf has merged &lt;a href=&quot;https://github.com/golang/protobuf/tree/dev&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/golang/protobuf/tree/dev&lt;/a&gt;&#160;into master on the 30th of april which will cause problems to anyone using protobuf generated code to encode data to bson.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/#!topic/protobuf/N-elvFu4dFM&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/#!topic/protobuf/N-elvFu4dFM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Specifically, they added 3 new fields to all generated structs&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;XXX_NoUnkeyedLiteral struct{} &#160; &#160; &#160; &#160;`json:&quot;-&quot;&quot;`&lt;/p&gt;

&lt;p&gt;XXX_unrecognized &#160; &#160; []byte &#160; &#160; &#160; &#160; &#160;`json:&quot;-&quot;&quot;`&lt;/p&gt;

&lt;p&gt;XXX_sizecache &#160; &#160; &#160; &#160;int32 &#160; &#160; &#160; &#160; &#160; `json:&quot;-&quot;`&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;The fix is to manually add a `bson:&quot;-&quot;` tag, however this breaks any CI that auto-regenerates protobuf on compilation.&lt;/p&gt;

&lt;p&gt;If the `bson` encoder supported reading the json tags it would work seamlessly.&lt;/p&gt;

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

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="537987">GODRIVER-401</key>
            <summary>Support `json:&quot;-&quot;` tags in the bson encoder</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="13203">Gone away</resolution>
                                        <assignee username="kris.brandow@mongodb.com">Kristofer Brandow</assignee>
                                    <reporter username="dgregoire">Dominic Gregoire</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 May 2018 15:44:37 +0000</created>
                <updated>Fri, 27 Oct 2023 20:01:36 +0000</updated>
                            <resolved>Mon, 8 Oct 2018 20:32:35 +0000</resolved>
                                    <version>0.0.3</version>
                                                    <component>BSON</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2019981" author="ithier" created="Mon, 1 Oct 2018 23:50:43 +0000"  >&lt;p&gt;&lt;tt&gt;+1 for StructTagParser&lt;/tt&gt;&lt;/p&gt;</comment>
                            <comment id="2016800" author="dgregoire" created="Thu, 27 Sep 2018 19:30:47 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=krisbrandow&quot; class=&quot;user-hover&quot; rel=&quot;krisbrandow&quot;&gt;krisbrandow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yes - &lt;tt&gt;StructTagParser&lt;/tt&gt; is a good idea - this will definitely work out.&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
D&lt;/p&gt;</comment>
                            <comment id="2016479" author="kris.brandow" created="Thu, 27 Sep 2018 16:19:35 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dgregoire&quot; class=&quot;user-hover&quot; rel=&quot;dgregoire&quot;&gt;dgregoire&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;A new Decoder and Encoder design will be merged into the codebase when &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-494&quot; title=&quot;BSON Codec Redesign&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-494&quot;&gt;&lt;del&gt;GODRIVER-494&lt;/del&gt;&lt;/a&gt; is complete. This will allow users to register a custom &lt;tt&gt;StructTagParser&lt;/tt&gt; with the struct encoder/decoder. This will allow users to parse the &lt;tt&gt;json&lt;/tt&gt; tag as necessary.&lt;/p&gt;

&lt;p&gt;Alternatively, you can use the gogo/protobuf library instead of the golang/protobuf one. This library contains support for custom struct tags: &lt;a href=&quot;https://github.com/gogo/protobuf/blob/master/extensions.md#more-serialization-formats&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/gogo/protobuf/blob/master/extensions.md#more-serialization-formats&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Do either of those solutions solve your needs?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Kris&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="572145">GODRIVER-494</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|hto3qf:</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>