Add a JsonConverter.Type property.#87382
Conversation
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsFix #63898.
|
| } | ||
| public static partial class JsonSerializer | ||
| { | ||
| public static bool IsReflectionEnabledByDefault { get { throw null; } } |
There was a problem hiding this comment.
A few unrelated reorderings caused by running the generation tool.
| Assert.Equal("{}", json); | ||
|
|
||
| Assert.Throws<NotSupportedException>(() => JsonSerializer.Deserialize<JsonConverter>(json, PublicContext.Default.Options)); | ||
| Assert.Throws<NotSupportedException>(() => JsonSerializer.Serialize(obj, PublicContext.Default.Options)); |
There was a problem hiding this comment.
Attempting to serialize a JsonConverter will now throw since it carries an unsupported property of type Type. I think that's ok since it's not a particularly meaningful scenario.
Fix #63898.