<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52: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>[JAVA-372] BSON.encode/decode should support primitive wrapper types as well</title>
                <link>https://jira.mongodb.org/browse/JAVA-372</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Whereas JSON.parse can parse the &quot;scalar&quot; types as well, and as such can return not just BSONObject, but also String or Long, BSON.encode/decode only work with BSONObject.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-298&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/JAVA-298&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;d like to be able to also do for example&lt;/p&gt;

&lt;p&gt;      byte[] aLong = BSON.encode(1l);&lt;br/&gt;
      byte[] aString = BSON.encode(&quot;string&quot;);&lt;/p&gt;

&lt;p&gt;For encode, this could be added as a new overload, for decode it would need to change the return type (from BSONObject to Object), so for the sake of compatibility, one would need to add a new method name.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="18013">JAVA-372</key>
            <summary>BSON.encode/decode should support primitive wrapper types as well</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="9">Done</resolution>
                                        <assignee username="antoine">Antoine Girbal</assignee>
                                    <reporter username="thiloplanz">Thilo Planz</reporter>
                        <labels>
                            <label>bson</label>
                    </labels>
                <created>Wed, 8 Jun 2011 02:35:08 +0000</created>
                <updated>Wed, 19 Oct 2016 23:20:48 +0000</updated>
                            <resolved>Wed, 19 Oct 2016 23:20:48 +0000</resolved>
                                    <version>2.6.1</version>
                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="56558" author="thiloplanz" created="Mon, 26 Sep 2011 06:04:06 +0000"  >&lt;p&gt;After another close look at the BSON spec, at least the decode/parse part of this cannot be done in symmetry to the JSON code: Unlike the various typed elements (including embedded documents), a BSON &quot;document&quot; has no special type indicator. The binary data just consists of the length field, the content, and a trailing null.&lt;/p&gt;

&lt;p&gt;So, you cannot call BSON.decode with binary data without already knowing that the data will be a document (and not anything else).&lt;/p&gt;

&lt;p&gt;Retracting this feature request, feel free to close it.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <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|hrhbzr:</customfieldvalue>

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