Use JSON enum to help with type inference

This branch is suppose to speed up compile time by using an `enum` to describe the JSON.
I think that could be up for discussion.  We should handle a possible null value coming over but perhaps error if the type cannot be distinguished.