Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Bson Serializer throws an exception when serializing a null property that is an interface
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Justin Dearing  
View profile  
 More options Sep 23 2012, 3:01 pm
From: Justin Dearing <zippy1...@gmail.com>
Date: Sun, 23 Sep 2012 12:01:51 -0700 (PDT)
Local: Sun, Sep 23 2012 3:01 pm
Subject: Bson Serializer throws an exception when serializing a null property that is an interface

A complete example of the failure is here:
http://pastebin.com/9SwV6Huh

Basically lets assume that AProp is property of type IProp, and IProp is an
interface:

                var superClass1 = new SuperClass
                {
                    Name = Guid.NewGuid().ToString(),
                    AProp = null
                }

No incantation of BsonSerializer.LookupSerializer(); will fix this. Should
there be some sort of "NullSerializer" to handle this? Should it just use
BsonNullSerializer? Is there a need for a specialized
BsonNullInterfacePropertySerializer?

If you don't feel this is by design, I'll file a bug an write a unit test.

Justin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Dearing  
View profile  
 More options Sep 23 2012, 3:35 pm
From: Justin Dearing <zippy1...@gmail.com>
Date: Sun, 23 Sep 2012 12:35:16 -0700 (PDT)
Local: Sun, Sep 23 2012 3:35 pm
Subject: Re: Bson Serializer throws an exception when serializing a null property that is an interface

Apparently this has been fixed post 1.6 release. Disregard.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
craiggwilson  
View profile  
 More options Sep 23 2012, 3:42 pm
From: craiggwilson <craiggwil...@gmail.com>
Date: Sun, 23 Sep 2012 12:42:23 -0700 (PDT)
Local: Sun, Sep 23 2012 3:42 pm
Subject: Re: Bson Serializer throws an exception when serializing a null property that is an interface

What is it that you were expecting a problem with?  What does 1.6 do that
has been fixed?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
craiggwilson  
View profile  
 More options Sep 23 2012, 3:45 pm
From: craiggwilson <craiggwil...@gmail.com>
Date: Sun, 23 Sep 2012 12:45:41 -0700 (PDT)
Local: Sun, Sep 23 2012 3:45 pm
Subject: Re: Bson Serializer throws an exception when serializing a null property that is an interface

I see.  Yes, here is the commit:  
https://github.com/mongodb/mongo-csharp-driver/commit/98a01290ffd0ae4...  
and the original jira was 564.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »