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.
Just as newtonsoft and system.text have converters to handle
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.