Skip to content

Greater DataContractSerializer compatibility #22

Closed

Description

@AArnott

no existing resolver can simulate DataContractSerializer.
ex:

[DataContract]
public class Master {
    [DataMember]
    public string A { get; set; }
    [DataMember]
    internal Detail B { get; set; }
}
public class Detail {
    public string B1 { get; set; }
    internal string B2 { get; set; }
}

The original DataContractSerializer, includes A, B and B1.
The ContractlessStandardResolver only includes A.
The ContractlessStandardResolverAllowPrivate, include A, B and B1 and B2.

Originally posted by @fredliex in #18 (comment)

Activity

  1. self-assigned this
    on Dec 16, 2018
  2. added
    enhancement
    on Dec 16, 2018
  3. AArnott commented on Dec 16, 2018

    @AArnott
    OwnerAuthor

    I'm working on a test to repro this.

  4. peterwald commented on Mar 6, 2019

    @peterwald

    It would be very helpful if we can also handle internal [DataContract] classes with internal [DataMember] properties as well.

    [DataContract]
    internal class Master {
        [DataMember]
        internal string A { get; set; }
        [IgnoreDataMember]
        internal string B { get; set; }
    }
  5. removed their assignment
    on Mar 6, 2019
  6. AArnott commented on Apr 3, 2019

    @AArnott
    OwnerAuthor

    Internal classes might work, depending on the real outcome of MessagePack-CSharp#88

  7. AArnott commented on Dec 6, 2019

    @AArnott
    OwnerAuthor

    If this isn't already working in 2.0, please open a new issue on the root project (not my fork).

  8. added a commit that references this issue on Mar 11, 2023
    9c3b3fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions