DerrickBrayanClayton / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
0 stars 0 forks source link

Inheritance requires ProtoInclude but DataContractSerializer can handle it directly #90

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Please include an e-mail address if this might need a dialogue!
==============

What steps will reproduce the problem?
1. When inheriting in protobuf-net, the ProtoInclude attribute is required
2. The same structure can be (de)serialized by WCF's (Data/Net/Json) 
serializers 

What is the expected output? What do you see instead?
I expected the parity with WCF serializers as to what attributes were 
required.  Functionality extending beyond that of WCF would understandably 
require custom attributes.

What version of the product are you using? On what operating system?
Trunk from svn on Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by mwatt...@gmail.com on 1 Feb 2010 at 8:51

GoogleCodeExporter commented 8 years ago
I would like to add a scenario. 
In ORM such as NHibernate, it always create DecoratorAopProxy for lazy 
property. Though 
it has been initialize but it's type is DecoratorAopProxy. So when use 
protobuf-net for 
serializing class, it  threw exception like 
"Unexpected type found during serialization; types must be included with 
ProtoIncludeAttribute; found DecoratorAopProxy"
I use    protobuf-net r282.zip.

Original comment by namtn2...@gmail.com on 18 Apr 2010 at 5:24

GoogleCodeExporter commented 8 years ago
@namtn2008 - I've tweaked this in v2 (r315). I don't plan on back-porting this 
to v1, 
but v2 is not far away now.

Original comment by marc.gravell on 19 Apr 2010 at 6:38