Enum members are not JSON-serializable by default. You should convert them to their primitive types (usually integers or strings) before serialization.