You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like that's the case. The custom converter is apparently implicitly present even when clearing all converters from the JsonSerializerOptions. There seems to be no way to remove it completely.
Description
Invalid JSON is generated when serializing an object when the
[JsonExtensionData]
attribute is applied to a property of typeJsonObject
.Reproduction Steps
see repository: https://github.com/nextdracool/JsonExtensionDataInvalidJsonWithJsonObject
Expected behavior
The
JsonObject
keys should be added to the serialized JSON object:{"Fixed":0,"foo":"bar"}
Actual behavior
Invalid JSON is generated:
{"Fixed":0,{"foo":"bar"}}
Regression?
No response
Known Workarounds
No response
Configuration
.NET 6 RC2,
System.Text.Json 6.0.21.48005
Other information
Possibly related to #60560
This feature was specifically mentioned in Preview 4.
The text was updated successfully, but these errors were encountered: