<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:35:44 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>[CSHARP-78] C# Driver should serialize shorts (System.Int16) as if they were ints</title>
                <link>https://jira.mongodb.org/browse/CSHARP-78</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;if I have an object with a member  &quot;short People&quot; it gets serialized into a mongo collection like so:&lt;/p&gt;

&lt;p&gt;&quot;People&quot; : {&lt;br/&gt;
        &quot;_t&quot; : &quot;System.Int16&quot;,&lt;br/&gt;
        &quot;_v&quot; : 300&lt;br/&gt;
},&lt;/p&gt;

&lt;p&gt;Why not serialize as an int? If its too big let it throw on deserialization if its too big.&lt;/p&gt;</description>
                <environment></environment>
        <key id="13454">CSHARP-78</key>
            <summary>C# Driver should serialize shorts (System.Int16) as if they were ints</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="zippy1981">Justin Dearing</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Oct 2010 10:52:47 +0000</created>
                <updated>Wed, 19 Oct 2016 14:16:07 +0000</updated>
                            <resolved>Fri, 22 Oct 2010 17:46:30 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="19513" author="zippy1981" created="Fri, 22 Oct 2010 18:39:01 +0000"  >&lt;p&gt;Thanks for the fix. &lt;/p&gt;

&lt;p&gt;I also weighted in on Adding short, and two other types to the BSON Spec. Would like to know your opinion on that.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/bson/browse_thread/thread/30f15798837847ec#&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/bson/browse_thread/thread/30f15798837847ec#&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="19506" author="rstam" created="Fri, 22 Oct 2010 17:46:30 +0000"  >&lt;p&gt;I know I need to go add a section to the tutorial about serialization, but here&apos;s the scoop: &lt;b&gt;sometimes&lt;/b&gt; it is necessary to serialize shorts the way you saw them (for example if the property were of type object we would need a discriminator to tell us it&apos;s a short and not an int). However, sometimes the context is enough to determine what needs to be done, as it is in the example you gave.&lt;/p&gt;

&lt;p&gt;Also, primitive types all have two serialization formats: compact and full. In the compact form we are trying to minimize space used. In the full form we are trying to be very precise and not lose any information.&lt;/p&gt;

&lt;p&gt;Anyway, the fix to your bug report is to default UseCompactRepresentation to true for primitive properties (so this is a small change to AutoMap).&lt;/p&gt;

&lt;p&gt;And as bugs often go, fixing one thing disturbs another, so while this started out as a simple fix quite a few things were changed until all unit tests (including new ones) were passing. See the commit comment for a bit more information on what changed.&lt;/p&gt;

&lt;p&gt;Thanks for the bug report.&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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh9tj:</customfieldvalue>

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