Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataContract Compatibility is broken #33

Closed
kikokikok opened this issue Jun 26, 2014 · 7 comments
Closed

DataContract Compatibility is broken #33

kikokikok opened this issue Jun 26, 2014 · 7 comments
Labels
bug Detected as bug

Comments

@kikokikok
Copy link

Hi I am trying to use MsgPack on a client project, it contains types where DataMember decorates private properties and not fields. When MsgPack tries to serialize those it fails because it doesn't look for DataMembers on private properties.

Could you maybe help me find out the best way to add support for that in order to be fuly compatible with DataContract specs.

I'm working on the 0.5 beta 1 version / branch

Thank you
Brgrds,

@yfakariya yfakariya added the bug label Jun 28, 2014
@yfakariya
Copy link
Member

@kikokikok

Sorry, it is a bug. I misunderstood DataContract behavior. I guess this fix rarely affect existing apps, so I will fix on 0.5 beta2.

@yfakariya
Copy link
Member

I've fixed this issue and pushed now.

@kikokikok
Copy link
Author

thanks for your reactivity, I'll test it and see how it goes.
just in order to be sure will it cover private decorated fields also ? because it is in the DataContractSerializer spec also

@kikokikok
Copy link
Author

Hi,
It doesn't really fix the problem, now it is unable to deserialize the type with a private decorated field / property
pretty simple to reproduce with a Unit Test

@yfakariya
Copy link
Member

Sorry. I had forgotten to test entire APIs, and I faced member accessibility related issues because serializers do not use reflection in runtime. (...And I faced another private iasue -- new baby was born.) I will tuckle this issue continuously, but it might take a long time to fix.

@yfakariya
Copy link
Member

I fixed it, so it now supports following classes when the members are marked with [DataMember] or [MessagePackMember] attributes: https://github.com/msgpack/msgpack-cli/blob/0.5/test/MsgPack.UnitTest/Serialization/SerializationTargets.cs

igadmg pushed a commit to igadmg/msgpack-cli that referenced this issue Aug 29, 2014
@yfakariya
Copy link
Member

Hi @kikokikok
Does this issue still exist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Detected as bug
Projects
None yet
Development

No branches or pull requests

2 participants