You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor enum serialization attributes to use System.Text.Json
- Updated enum serialization attributes from System.Runtime.Serialization.EnumMember to System.Text.Json.Serialization.JsonStringEnumMemberName for consistency and improved JSON handling.
- Introduced EmptyStringEnumConverter to handle empty strings and nulls for enum properties.
- Enhanced JSON serialization options in WeaviateRestClient to improve error handling during deserialization.
- Adjusted various model classes to utilize the new serialization attributes and converters.
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,9 @@
20
20
- Use `ToModel()`/`ToDto()` in `Rest/Dto/Extensions.cs` for mapping
21
21
22
22
## Enum & Wire Format
23
-
- Use `ToEnumMemberString()`/`FromEnumMemberString<T>()` for conveting enums to and from strings
23
+
- Use `ToEnumMemberString()`/`FromEnumMemberString<T>()` for converting enums to and from strings
24
24
- Always prefer enums for permission actions and resource types
25
+
- Stick to .NET defaults for JSON serialization, using JsonStringEnumMemberName on enum values for specifying the string conversion, and System.Text.Json.Serialization.JsonStringEnumConverter on properties and fields to speciy the actual conversion on the properties.
0 commit comments