Feature/3.x/enum serialization

add support for serializing enums