Get rid of janky map and use Jackson's built-in subtyping mechanisms