Rework json type definitions and prototyped switching response type based only on the accept header.