String to Class?

I’ve used the JSON plugin to save my level and it works very well, though when doing so i’m forced to store a key value integer which represents a class and is then re-translated back when the file is loaded, like this:

Save:
if class = actor1, save class:“0”

Load:
if class = “0”, create class:“actor1”

This works fine, but I’d like to make this more dynamic so that I can create actors without updating this index each time.

I’d like to instead store the class name in the json as plain text, however doing this has proved troublesome. Is there a way to load a class from a string which is the same as the class name? I feel like this should be doable, but I can’t seem to figure it out easily using BPs.

Thoughts?