Skip to content

Greater DataContractSerializer compatibility #1297

Closed

Description

@fredliex

Is your feature request related to a problem? Please describe.

reopen AArnott#22.

The main purpose is to serialize/deserialize nonpublic members with marked DataMemberAttribute, but those without DataMemberAttribute must be excluded, even public members.

Additional context

If necessary, I can assist in establishing a PR.

There are currently two options in mind.

  1. Change the behavior of the existing DynamicObjectResolver.
  2. Add a DataContractSerializerCompatibilityResolver to handle it.

Which one is better?
Any suggestions?

Activity

  1. fredliex commented on Aug 4, 2021

    @fredliex
    ContributorAuthor

    Good news.
    The original DynamicObjectResolverAllowPrivate + ContractlessStandardResolver can achieve the same purpose, so no modification is required.

    I will still provide two RPs

    1. Unit test for compatibility of DataContractSerializer.
    2. Refactoring of ObjectSerializationInfo.CreateOrNull.

    Thank.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions