After giving it some thought, it seems logical: getting the string of an enum via toString() will result in its (serialised) name, not its value. But how should I go about this in this case?