WIP JSON refactor - tidy up ScalarTypes