2 ms·
> Should every object type have a specific media type Probably not. Consider that a given object in a system might have a json representation, an xml represent
by wwweston 7y ago
> Should every object type have a specific media type
Probably not. Consider that a given object in a system might have a json representation, an xml representation, an html representation, etc. Media types are less about the in-system representation or type for a given entity, and more about how the entity is rendered. Many different in-system entities might be represented by the same media type, a single in-system entity might be rendered as several media types.
(In practice, yeah, application/json will cover you, though application/vnd.api.vN+json gives you some room to maneuver negotiate version/app specifics with various clients using Accepts headers.)