-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Just as newtonsoft and system.text have converters to handle
[JsonStringEnumConverter]
[StringEnumConverter]
public enum MyEnum {text, refusal, toolresponse, image, url, filename, b64, block, application, html }
Magic should also support this functionality, as add/removing, or even re-arranging an enum in code will silently break the database versions. by converting to string names. we not only get a solid error if there is a mismatch during deserialization. re-arranging/adding/deleting enums will not break the database.
It just seems to me you can "peek" into the reflection and look for these system.text or newtownsoft attributes without needing to add more MagicAttributes to trigger a converter.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request