Add support for Guid enum serialization#565
Open
RichardReedge wants to merge 2 commits intoardalis:mainfrom
Open
Add support for Guid enum serialization#565RichardReedge wants to merge 2 commits intoardalis:mainfrom
RichardReedge wants to merge 2 commits intoardalis:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Guid enum serialization across multiple serialization libraries by introducing a new TestEnumGuid class and updating all relevant formatters and converters to handle Guid types properly.
- Adds TestEnumGuid and FlagTestEnumGuid classes with Guid values across all test projects
- Updates serialization formatters/converters to handle Guid serialization as strings
- Removes IConvertible constraint from SystemTextJson converters to support Guid types
- Adds comprehensive test coverage for Guid enum serialization in all supported libraries
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| TestEnums.cs files | Add TestEnumGuid class definitions with standard Guid value |
| FlagTestEnums.cs files | Add FlagTestEnumGuid class for flag enum testing |
| Test files | Update test classes, instances, and assertions to include Guid enum testing |
| SmartEnumValueFormatter.cs | Add Guid serialization support for Utf8Json library |
| SmartFlagEnumValueFormatter.cs | Add Guid serialization support for Utf8Json flag enums |
| SmartEnumValueConverter.cs | Add Guid support and remove IConvertible constraint for SystemTextJson |
| SmartEnumNameConverter.cs | Remove IConvertible constraint to support Guid types |
| JsonNet converters | Add Guid parsing support for JsonNet library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #561