<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:34 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-351] Better error message when document being deserialized doesn&apos;t match class declaration</title>
                <link>https://jira.mongodb.org/browse/CSHARP-351</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Given the following classes:&lt;/p&gt;

&lt;p&gt;    public class C &lt;/p&gt;
{
        public int _id;
        public N n;
    }

&lt;p&gt;    public class N &lt;/p&gt;
{
        public int x;
    }

&lt;p&gt;the following code results in an InvalidOperationException:&lt;/p&gt;

&lt;p&gt;    var json = &quot;&lt;/p&gt;
{ &apos;_id&apos; : 1, n : &apos;should be a document, not a string&apos; }
&lt;p&gt;&quot;;&lt;br/&gt;
    BsonSerializer.Deserialize&amp;lt;C&amp;gt;(json);&lt;/p&gt;

&lt;p&gt;The error message should be more specific, identifying which property of which class couldn&apos;t be deserialized.&lt;/p&gt;</description>
                <environment></environment>
        <key id="24450">CSHARP-351</key>
            <summary>Better error message when document being deserialized doesn&apos;t match class declaration</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="robert@mongodb.com">Robert Stam</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Nov 2011 15:30:35 +0000</created>
                <updated>Thu, 2 Apr 2015 18:27:41 +0000</updated>
                            <resolved>Fri, 4 Nov 2011 18:38:51 +0000</resolved>
                                    <version>1.3</version>
                                    <fixVersion>1.3.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="143219" author="auto" created="Mon, 16 Jul 2012 14:30:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-07-16T05:59:09-07:00&apos;, u&apos;email&apos;: u&apos;robert@10gen.com&apos;, u&apos;name&apos;: u&apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-351&quot; title=&quot;Better error message when document being deserialized doesn&amp;#39;t match class declaration&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-351&quot;&gt;&lt;del&gt;CSHARP-351&lt;/del&gt;&lt;/a&gt;: Make settings classes more robust by adding some checks for nulls. Protect Servers property of MongoServerSettings from modification. Fixed some bugs in MongoGridFSSettings.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/a5094971192c41df392d4c6d6f20d68a7dd129a2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/a5094971192c41df392d4c6d6f20d68a7dd129a2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="64802" author="rstam" created="Fri, 4 Nov 2011 18:38:51 +0000"  >&lt;p&gt;When the BsonClassMapSerializer encounters an error deserializing a field or property the name of the field or property as well as the name of the class they are in are included in the error message to assist the user in troubleshooting the problem.&lt;/p&gt;

&lt;p&gt;Backward breaking in the sense that the type of the exception thrown is sometimes different.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh88f:</customfieldvalue>

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