Repository navigation
Support JsonStringEnumConverter. Fixes #19086 - #20446
Merged
Merged
Conversation
pranavkm
approved these changes
Apr 2, 2020
| statically. It's only JsonStringEnumConverter that currently isn't referenced statically. | ||
| The following is a workaround for https://github.com/dotnet/aspnetcore/issues/19086. | ||
| The underlying issue is reported in the runtime repo at https://github.com/dotnet/runtime/issues/34449 --> | ||
| <type fullname="System.Text.Json.Serialization.*Converter"> |
Contributor
There was a problem hiding this comment.
Ahh, I see. The embedded linker config includes JsonConverterEnum<T>, but the not the string one.
Member
Author
There was a problem hiding this comment.
Is there an embedded linker config in S.T.J? I didn't spot one.
AFAIK the way the other converters are avoiding having their constructors get culled is that they are referenced statically from some bits of code that cache instances.
Contributor
There was a problem hiding this comment.
Yup, here's what it says:
<linker>
<assembly fullname="System.Text.Json">
<type fullname="System.Text.Json.JsonPropertyInfoNullable`2">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<type fullname="System.Text.Json.Serialization.JsonPropertyInfoNotNullableContravariant`4">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<type fullname="System.Text.Json.Serialization.Converters.JsonConverterEnum`1">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<type fullname="System.Text.Json.Serialization.Converters.JsonKeyValuePairConverter`2">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
</assembly>
</linker>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It was a linker thing. See explanation in the code.