All calls to JsonSerializer.Serialize should use JsonSerialisationOptions.Options #3419
Labels
0 - Backlog
Bug
good first issue
.NET
Pull requests that update .net code
v9
Required for v9 release
v10
Allocal to a v10 release
Describe the bug
In constructing the Brighter service host, I add my JsonConverters to JsonSerialisationOptions.Options.Converters. I use these converters to serialize/deserialize Brighter messages. Unfortunately, there are instances of JsonSerializer.Serialize in the code (e.g., RequestLoggingHandler and RequestLoggingHandlerAsync) that doesn't include JsonSerialisationOptions.Options in calls to JsonSerializer.Serialize and JsonSerializer.Deserialize. When logging the request, the serialization fails. Similar behavior for BrighterTracer.
I'm happy to make these changes in a PR.
To Reproduce
Steps to reproduce.
Fix
Update all calls to JsonSerializer.Serialize and JsonSerializer.Deserialize to include JsonSerialisationOptions.Options.
Exceptions (if any)
Further technical details
The text was updated successfully, but these errors were encountered: