I am attempting to recreate from a JSON string, a collection that holds enum constants (the source of the JSON string). I'm having difficulty figuring out how to recreate the enum from a string. The enums hold a variety of methods which I need access to.
The answers I've seen this and this one, result in a class which enables you to iterate through the constants rather than recreating the original enum. I want to pass the enums around other existing classes without having to rewrite code to cope with a new class.
Is this even possible? Can you use a JSON string to help recreate an enum in such a way you can use it as an enum?
EDIT: Bizarre, I have a big red banner telling me Stack Overflow requires external Javascript and now I cannot comment on posts...
Thanks Brian for your reply below, but it appears in essence to be the same as the two I linked to here, it does not result in you actually having the enum object, just the constants via a different method.