<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58:20 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-2905] JsonReader doesn&apos;t parse DBPointer in strict representation correctly</title>
                <link>https://jira.mongodb.org/browse/JAVA-2905</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Hi Experts,&lt;/p&gt;

&lt;p&gt;I am using JsonReader in Bson lib to parse the JSON in strict representation, but it looks like the DBPointer type is not correctly parsed, it parsed as DOCUMENT type.&lt;/p&gt;

&lt;p&gt;Attachment is a simple test program to reproduce this problem, can you please look at it and suggest me? Thank you very much!&lt;/p&gt;

&lt;p&gt;BTW. I am using bson-3.8.0.jar in the test.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Jin&lt;/p&gt;</description>
                <environment></environment>
        <key id="570077">JAVA-2905</key>
            <summary>JsonReader doesn&apos;t parse DBPointer in strict representation correctly</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="zhao">jin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Jul 2018 02:34:21 +0000</created>
                <updated>Mon, 11 Feb 2019 15:24:18 +0000</updated>
                            <resolved>Mon, 11 Feb 2019 15:24:18 +0000</resolved>
                                                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2100456" author="jeff.yemin" created="Wed, 26 Dec 2018 20:11:27 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=zhao&quot; class=&quot;user-hover&quot; rel=&quot;zhao&quot;&gt;zhao&lt;/a&gt;.  I agree it&apos;s low priority.  I have never heard of a DBPointer actually used by anyone.  &lt;/p&gt;

&lt;p&gt;To answer your questions:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Extended JSON is the recommended way to interoperate with JSON in drivers, as it is able to preserve all BSON type information.&lt;/li&gt;
	&lt;li&gt;MongoDB currently doesn&apos;t provide a command-line tool that imports/exports in extended JSON, but please follow &lt;a href=&quot;https://jira.mongodb.org/browse/TOOLS-1610&quot; title=&quot;implement the extended json spec in import/export&quot; class=&quot;issue-link&quot; data-issue-key=&quot;TOOLS-1610&quot;&gt;&lt;del&gt;TOOLS-1610&lt;/del&gt;&lt;/a&gt; to track the work that we&apos;re doing to enable that.  Meanwhile, it&apos;s easy to write your own using any of the supported MongoDB drivers, including the Java driver.&lt;/li&gt;
	&lt;li&gt;The specification is here: &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/extended-json.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/extended-json.rst&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="2096684" author="zhao" created="Thu, 20 Dec 2018 01:46:10 +0000"  >&lt;p&gt;Hi Ross,&lt;/p&gt;

&lt;p&gt;Sorry for my late response.&lt;/p&gt;

&lt;p&gt;What I am doing to try parse JSON output from mongoexport which is in strict mode to be used by our application, since we want to make it as general utility, so that we try to cover all supported types, that why BsonDbPointer type is included. If BsonDbPointer was deprecated for many years, maybe this problem is really low priority and probably can be ignored.&#160;&lt;/p&gt;

&lt;p&gt;I have questions for EXTEDNED JSON representation:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Is it recommended JSON representation in MongoDB?&lt;/li&gt;
	&lt;li&gt;Which tool can be used to dump data from MongoDB to EXTENDED JSON mode, it looks like mongoexport always dump to STRICT mode JSON.&lt;/li&gt;
	&lt;li&gt;Where can I find the spec of EXTENDED JSON representation? The document &lt;a href=&quot;https://docs.mongodb.com/manual/reference/mongodb-extended-json/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/mongodb-extended-json/&#160;&lt;/a&gt;describes STRICT mode and SHELL mode but not for EXTENDED mode&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thank you so much!&lt;/p&gt;

&lt;p&gt;Jin&lt;/p&gt;</comment>
                            <comment id="2089620" author="ross@10gen.com" created="Thu, 13 Dec 2018 15:38:14 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=zhao&quot; class=&quot;user-hover&quot; rel=&quot;zhao&quot;&gt;zhao&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Apologies for the lack of feedback on this ticket. I have been working on a &lt;a href=&quot;https://github.com/rozza/mongo-java-driver/tree/j2905&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;fix&lt;/a&gt; but before I commit it, I&apos;d like to understand a little more about your usecase specifically:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Why use the STRICT over the EXTENDED Json&#160;representation? STRICT is now deprecated.&lt;/li&gt;
	&lt;li&gt;Why use BsonDbPointer - the Bson DBPointer type was deprecated many years ago.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The reasons for the questions are due to the fix. It would change how a BsonDbPointer is encoded into json, so that it matches the EXTENDED spec rather than following the &lt;a href=&quot;https://docs.mongodb.com/manual/reference/database-references/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;DBRef convention&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Many thanks,&lt;/p&gt;

&lt;p&gt;Ross&lt;br/&gt;
&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="191560" name="TestDBPointer.java" size="1480" author="zhao" created="Wed, 11 Jul 2018 02:29:19 +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|hr867b:</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>