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

Support for [JsonObject(MemberSerialization.OptIn)] attribute #31101

Closed
cedemax opened this issue Oct 8, 2019 · 2 comments
Closed

Support for [JsonObject(MemberSerialization.OptIn)] attribute #31101

cedemax opened this issue Oct 8, 2019 · 2 comments

Comments

@cedemax
Copy link

cedemax commented Oct 8, 2019

Newtonsoft.Json supports a convenient way to serialize certain types of classes using attributes only, by specifying the [JsonObject(MemberSerialization.OptIn)] attribute on the class, and then picking the desired properties to serialize using the [JsonProperty] attribute on the. This does not seem to be supported yet?

Is there a viable workaround other than writing custom converters for all those classes?

@Symbai
Copy link

Symbai commented Oct 8, 2019

Dupe of #30180

@ahsonkhan
Copy link
Member

Closing as duplicate.

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 5.0 milestone Feb 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants