Using enum for json types for better debugging