<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:13:40 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>[CDRIVER-1938] bson_as_json converts int64 to scientific notation</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1938</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;When trying to retrieve an int64 value using mongoc_collection_find, mongoc_cursor_next, and bson_as_json, I need to see the full value.  When I run the code now, it translates my value into scientific notation, which loses precision (e.g., 1479421652125003000 becomes  1.479421652125e+18).&lt;/p&gt;

&lt;p&gt;Is there any way to get the actual value instead of the scientific notation value?&lt;/p&gt;</description>
                <environment>Linux</environment>
        <key id="334668">CDRIVER-1938</key>
            <summary>bson_as_json converts int64 to scientific notation</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="darin.christenson@lmco.com">Darin Christenson</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Nov 2016 21:11:11 +0000</created>
                <updated>Wed, 11 Sep 2019 19:06:03 +0000</updated>
                            <resolved>Tue, 28 Feb 2017 21:12:12 +0000</resolved>
                                    <version>1.3.5</version>
                                    <fixVersion>1.7.0</fixVersion>
                                    <component>json</component>
                    <component>libbson</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1508470" author="xgen-internal-githook" created="Fri, 24 Feb 2017 01:46:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1947&quot; title=&quot;Improve libbson compatibility with the BSON Corpus tests&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1947&quot;&gt;&lt;del&gt;CDRIVER-1947&lt;/del&gt;&lt;/a&gt; generate int64 as $numberLong&lt;/p&gt;

&lt;p&gt;Fixes &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1938&quot; title=&quot;bson_as_json converts int64 to scientific notation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1938&quot;&gt;&lt;del&gt;CDRIVER-1938&lt;/del&gt;&lt;/a&gt;, there is now a lossless format for int64.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libbson/commit/15122b281e24785b0f2a74bc1667915253a1db7f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/15122b281e24785b0f2a74bc1667915253a1db7f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1443880" author="jesse" created="Mon, 28 Nov 2016 21:30:39 +0000"  >&lt;p&gt;Hi Darin. Currently, no, there&apos;s no way to make bson_as_json produce exact output. We&apos;ve discussed this in &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-375&quot; title=&quot;Support $numberLong for extended JSON parsing and generation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-375&quot;&gt;&lt;del&gt;CDRIVER-375&lt;/del&gt;&lt;/a&gt;, so far we haven&apos;t specified a feature for MongoDB drivers for exact JSON output. Likely, we will some day provide you the option of outputting int64&apos;s as &lt;tt&gt;$numberLong: &quot;123&quot;&lt;/tt&gt;, the same as the input format.&lt;/p&gt;

&lt;p&gt;Meanwhile, you can certainly read the exact value in C with bson_iter_as_int64, but you&apos;ll need to convert the result to a string yourself in order to preserve precision.&lt;/p&gt;</comment>
                    </comments>
                    <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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CDRIVER-1947</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrb5dr:</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>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1602">C Driver 2017 2 - Feb 10, 2019</customfieldvalue>

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