Skip to content

Commit

Permalink
fix: InlineAutoMoqData was unable to create an instance from System.T…
Browse files Browse the repository at this point in the history
…ext.Json.JsonSerializerOptions
  • Loading branch information
MadsDue committed Nov 22, 2024
1 parent df6aec8 commit aba5ea8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public JsonSerializer(JsonSerializerOptions? options = null)
_options.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb);
}

public JsonSerializer()
{
_options = new JsonSerializerOptions();
_options.Converters.Add(NodaConverters.InstantConverter);
_options.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb);
}

public async ValueTask<object> DeserializeAsync(Stream utf8Json, Type returnType)
{
ArgumentNullException.ThrowIfNull(utf8Json);
Expand Down

0 comments on commit aba5ea8

Please sign in to comment.