-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NodaTime.Instant fails to serialize to JSON properly despite configuring Nodatime Serializer #543
Comments
Hey @JoshuaNitschke There are actually 2 JsonOptions which exist. My belief is that you are configuring the Mvc version but not the Microsoft.AspNetCore.Http.Json.JsonOptions version which is what wolverine actually depends on. See dotnet/aspnetcore#35904 for more detail |
@alistair I don't think so - did you pull the repo? |
Yeah I did but actually replicated it slightly differently. Just finished cleaning up my branch and created this above PR so that wolverine captures the IOption<> over referencing the JsonOption directly. |
@alistair thank you sir!!! |
I tried to configure the JSON serializer several different ways as you can see in the example repo, but I couldn't find a method / order that would serialize JSON responses as expected.
STEPS TO REPRODUCE
RESULT
EXPECTED RESULT
Instant to serialize in ISO-8601 pattern e.g. 2023-09-11T23:35:41.101553Z
OTHER RESOURCES
@alistair made this: https://github.com/alistair/wolverine/tree/configure_json_serializer
Discord report: https://discord.com/channels/1074998995086225460/1150925861458030655
Possibly related Marten issue: JasperFx/marten#2613
The text was updated successfully, but these errors were encountered: