<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:59: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>[SERVER-2157] mongoexport fails with: 10311 Number nan cannot be represented in JSON</title>
                <link>https://jira.mongodb.org/browse/SERVER-2157</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Exporting to JSON using mongoexport any record that contains a float which has value NaN will fail.&lt;/p&gt;

&lt;p&gt;Simple Example:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
&quot;slatlng&quot; : &lt;span class=&quot;error&quot;&gt;&amp;#91;NaN, NaN&amp;#93;&lt;/span&gt;&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;Additionally:&lt;/p&gt;

&lt;p&gt;When in the mongo console, you can exclude such records using:&lt;/p&gt;

&lt;p&gt;&quot;slatlng&quot; : {$ne &lt;span class=&quot;error&quot;&gt;&amp;#91;NaN, NaN&amp;#93;&lt;/span&gt;}&lt;/p&gt;

&lt;p&gt;but mongoexport cannot parse this as a valid json query. So you cannot do it.&lt;/p&gt;


</description>
                <environment>osx, mongo_export, macbook pro</environment>
        <key id="13819">SERVER-2157</key>
            <summary>mongoexport fails with: 10311 Number nan cannot be represented in JSON</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="brandon">Brandon Diamond</assignee>
                                    <reporter username="rathboma">Matthew Rathbone</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Nov 2010 19:08:28 +0000</created>
                <updated>Tue, 12 Jul 2016 00:18:12 +0000</updated>
                            <resolved>Sat, 3 Dec 2011 02:47:21 +0000</resolved>
                                                    <fixVersion>2.1.0</fixVersion>
                                    <component>JavaScript</component>
                    <component>Tools</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="70657" author="auto" created="Sat, 3 Dec 2011 13:37:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;dwight&apos;, u&apos;name&apos;: u&apos;dwight&apos;, u&apos;email&apos;: u&apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: buildbot tojson NaN &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2157&quot; title=&quot;mongoexport fails with: 10311 Number nan cannot be represented in JSON&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2157&quot;&gt;&lt;del&gt;SERVER-2157&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a094d5ff9169043cce5bba3a9270a8585443bcbd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a094d5ff9169043cce5bba3a9270a8585443bcbd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="70586" author="auto" created="Fri, 2 Dec 2011 22:20:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;&apos;, u&apos;name&apos;: u&apos;Brandon Diamond&apos;, u&apos;email&apos;: u&apos;brandon@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2157&quot; title=&quot;mongoexport fails with: 10311 Number nan cannot be represented in JSON&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2157&quot;&gt;&lt;del&gt;SERVER-2157&lt;/del&gt;&lt;/a&gt;: test for NaN support&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1836bcd19b7039fe9e5bb8ab77a583e83c6c8bc6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1836bcd19b7039fe9e5bb8ab77a583e83c6c8bc6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="70585" author="auto" created="Fri, 2 Dec 2011 22:20:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;&apos;, u&apos;name&apos;: u&apos;Brandon Diamond&apos;, u&apos;email&apos;: u&apos;brandon@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2157&quot; title=&quot;mongoexport fails with: 10311 Number nan cannot be represented in JSON&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2157&quot;&gt;&lt;del&gt;SERVER-2157&lt;/del&gt;&lt;/a&gt;: can now import/export NaN fields&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c41841daa377747524a6050fa35fabd83c8f37e9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c41841daa377747524a6050fa35fabd83c8f37e9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="20846" author="eliot" created="Tue, 30 Nov 2010 19:15:30 +0000"  >&lt;p&gt;Not really.&lt;/p&gt;

&lt;p&gt;I would recommend writing your own json exportor.&lt;/p&gt;

&lt;p&gt;Easy to do in any language.&lt;/p&gt;</comment>
                            <comment id="20845" author="van" created="Tue, 30 Nov 2010 19:11:58 +0000"  >&lt;p&gt;I&apos;m getting the error but I&apos;m not sure where the NaN is, it could be anywhere among the 200k documents and their subdocs.  Is there a temp solution you could recommend for that situation?&lt;/p&gt;</comment>
                            <comment id="20811" author="eliot" created="Tue, 30 Nov 2010 04:11:01 +0000"  >&lt;p&gt;Do you have NaN all over?  If so - the type query probably won&apos;t work.&lt;br/&gt;
If its just a single field or array, it will work.&lt;/p&gt;</comment>
                            <comment id="20807" author="van" created="Tue, 30 Nov 2010 03:11:13 +0000"  >&lt;p&gt;is there an example of how to exclude $type:6 from every field and subfield?&lt;/p&gt;</comment>
                            <comment id="20795" author="eliot" created="Tue, 30 Nov 2010 00:44:35 +0000"  >&lt;p&gt;Scott&apos;s suggestion should work temporarily.&lt;/p&gt;

&lt;p&gt;The other option is of course just writing your own json exporter.&lt;/p&gt;

&lt;p&gt;We&apos;ll need to figure out a long term solution.&lt;/p&gt;</comment>
                            <comment id="20770" author="scotthernandez" created="Mon, 29 Nov 2010 19:25:52 +0000"  >&lt;p&gt;You should be able to exclude $type:6 (undefined) data. Or better yet, just export $type:1 (double).&lt;/p&gt;</comment>
                            <comment id="20769" author="rathboma" created="Mon, 29 Nov 2010 19:24:28 +0000"  >&lt;p&gt;Ok, so to elaborate a little more:&lt;/p&gt;

&lt;p&gt;We&apos;re storing values with NaN for some reason (probably stored by the ORM we&apos;re using).&lt;/p&gt;

&lt;p&gt;Ideally I&apos;d like mongoexport to succeed and replace the NaN with something else (undefined, null, false, &quot;NaN&quot;, anything really). Maybe it should even skip the record. My real problem is that it causes mongoexport to crash and stop exporting.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 29 Nov 2010 19:25:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 11 weeks, 4 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 11 weeks, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>brandon</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>rathboma</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>van</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpatz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgcgf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8927</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsu4a7:</customfieldvalue>

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