Added support for (de)serializing enums to/from JSON. Also made it so that the unit tests run both at compile time and runtime.