<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:13 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-1280] In JsonWriter, support writing BSON Int64 values as JSON numbers rather than $numberLong</title>
                <link>https://jira.mongodb.org/browse/JAVA-1280</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;MongoDB 2.6 introduced support for the NumberLong data type in MongoDB Extended JSON using $numberLong. &lt;/p&gt;

&lt;p&gt;In strict mode, JsonWriter will write all Int64 values using $numberLong.  But some applications will prefer to lose the type information and just writes them as JSON numbers.&lt;/p&gt;</description>
                <environment></environment>
        <key id="142262">JAVA-1280</key>
            <summary>In JsonWriter, support writing BSON Int64 values as JSON numbers rather than $numberLong</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ross@mongodb.com">Ross Lawley</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Jun 2014 14:52:01 +0000</created>
                <updated>Thu, 9 Mar 2017 20:23:44 +0000</updated>
                            <resolved>Thu, 9 Mar 2017 20:23:44 +0000</resolved>
                                                                    <component>JSON</component>
                                        <votes>3</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1520363" author="jeff.yemin" created="Thu, 9 Mar 2017 20:23:44 +0000"  >&lt;p&gt;Closing as won&apos;t fix, since &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1772&quot; title=&quot;Make it easier to change JsonWriter&#160;behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1772&quot;&gt;&lt;del&gt;JAVA-1772&lt;/del&gt;&lt;/a&gt; allows applications to achieve the same effect.&lt;/p&gt;</comment>
                            <comment id="1520362" author="jeff.yemin" created="Thu, 9 Mar 2017 20:23:02 +0000"  >&lt;p&gt;In scope of &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1772&quot; title=&quot;Make it easier to change JsonWriter&#160;behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1772&quot;&gt;&lt;del&gt;JAVA-1772&lt;/del&gt;&lt;/a&gt;, you can add a custom converter for BSON Int64 values (or any other type).  This code, for example:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        JsonWriterSettings settings = JsonWriterSettings.builder()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;                                                 .int64Converter((value, writer) -&amp;gt; writer.writeNumber(value.toString()))&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;                                                 .build();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        String json = &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; Document(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;).append(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;b&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;, Long.MAX_VALUE).toJson(settings);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;will output:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;a&quot; : 12, &quot;b&quot; : 9223372036854775807 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="1468122" author="jeff.yemin" created="Tue, 3 Jan 2017 14:28:11 +0000"  >&lt;p&gt;We plan to address this, probably in scope of &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1772&quot; title=&quot;Make it easier to change JsonWriter&#160;behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1772&quot;&gt;&lt;del&gt;JAVA-1772&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1468116" author="dufgui" created="Tue, 3 Jan 2017 14:23:21 +0000"  >&lt;p&gt;ok, so you can close it as unresolved ;o(&lt;/p&gt;</comment>
                            <comment id="1373272" author="michaeldgagnon" created="Wed, 31 Aug 2016 13:43:14 +0000"  >&lt;p&gt;This current functionality (among other things) breaks the upgrade path in Scala when moving from Casbah driver - which unfortunately is a hard requirement if one intends to migrate beyond Mongo 3.0. Was using toJson on documents fetched as input to a JSON =&amp;gt; case class deserializer, and this format introduces unconsidered expectations which breaks that. My only current recourse seems to be sanitizing the document first by converting bson longs to bson strings or to otherwise hand-roll deserialization logic for all document types in my system. It&apos;s a fairly large increase in complexity&lt;/p&gt;</comment>
                            <comment id="1221030" author="dufgui" created="Thu, 31 Mar 2016 11:31:54 +0000"  >&lt;p&gt;I try a PR on this&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/346&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/346&lt;/a&gt;&lt;br/&gt;
Hope it can help. &lt;/p&gt;</comment>
                            <comment id="628013" author="jeff.yemin" created="Thu, 19 Jun 2014 19:44:48 +0000"  >&lt;p&gt;I think that the driver should punt on this until &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6812&quot; title=&quot;Extended JSON syntax should support all BSON types&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6812&quot;&gt;&lt;del&gt;SERVER-6812&lt;/del&gt;&lt;/a&gt; is addressed, in particular the part about &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;mongoexport should have a flag for whether to represent integers in JSON syntax (lossy, but backward compatible and better for interoperability with other JSON tools), or in Extended JSON syntax.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;and once those flag(s) are defined the driver can expose corresponding flags.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="198853">JAVA-1772</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="47773">SERVER-6812</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|hrc7fj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8531</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="202">Sprint 4 - June 16 - July 3</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>