re: https://twitter.com/apiblueprint/status/374456335846612992
application/json;charset=utf-8
application/json; charset=utf-8
application/json; charset="utf-8"
application/json // since JSON's default unicode charset is UTF-8
Not many, ~ if any, clients/servers are able to handle all combinations and their equivalence. I'll cut it short: decisions shouldn't be driven imho by current failures.. I meant current implementations, but in the case of version
, within the mindset of a very convoluted HTTP grammar, I fall on the KISS side.
From here:
Parameters are modifiers of the media subtype, and as such do not
fundamentally affect the nature of the content. The set of
meaningful parameters depends on the media type and subtype. Most
parameters are associated with a single specific subtype. However, a
given top-level media type may define parameters which are applicable
to any subtype of that type. Parameters may be required by their
defining media type or subtype or they may be optional. MIME
implementations must also ignore any parameters whose names they do
not recognize.
So does version affect fundamentaly the nature of the content? I'd say so due to breaking changes, but the floor is open to interpretation.
@andreineculau My pragmatic goals:
I'd say what might make sense is to have major versions directly in media type and roll "big changes" (= those that are not superset, but changes/renames structure in significant way) by changing it. Everything else should be compatible and thus modified by parameter.
But, being on KISS side, I'd not overcomplicate it and just push everything into parameter ;)
Thoughts?
P.S.: All your three examples are invalid