Skip to content
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

feat: allow serialization of DateTimeOffset #251

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Apr 26, 2023

Resolves #103

Behavior

Before the change?

  • Calling JsonSerializer.Serialize for any webhook payloads that had DateTimeOffset properties would throw a JsonException

After the change?

Other information


Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

  • Feature/model/API additions: Type: Feature

This allows serialization of `DateTimeOffset` and `DateTimeOffset?` to ISO 8601 using [the round-trip format][1]

Closes #103

[1]: https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings#the-round-trip-o-o-format-specifier
@JamieMagee JamieMagee added the Type: Feature New feature or request label Apr 26, 2023
Copy link
Collaborator

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ❤️

@JamieMagee JamieMagee enabled auto-merge (squash) April 27, 2023 19:37
auto-merge was automatically disabled April 27, 2023 20:03

Base branch was modified

@JamieMagee JamieMagee merged commit ff9c093 into main Apr 27, 2023
@JamieMagee JamieMagee deleted the feat/serialize-datetimeoffset branch April 27, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Allow serialization of DateTimeOffset
2 participants