Added ability to automatically serialise dynamic enums