Worked out issue of converting enumeration to properly formed JSON