For instance, I was thinking of replacing this:
var.StringAttribute = input.ReadString();
With something like this:
var.EnumAttribute = input.ReadExternalReference<EnumName>();
However this doesn't work quite right. And ideas on how to get input to read a custom enumeration?