Use multiple types to represent json data