type name / [ tree. ] subtype name [ +suffix ] [ ; parameters ]
"+suffix" constructs for as-yet unregistered structured syntaxes
SHOULD NOT be used, given the possibility of conflicts with future
"+json", "+ber", "+der", "+fastinfoset", "+wbxml" and "+zip"
"title": "<h1>Some formatted title</h1>",
"body": "here's a <b>long</b> formatted text with <i>stuff</i>"
RFC 2616 is obsolete. Please look at RFC 7231.
I wouldn't use
html+json for something that is a mix of HTML and JSON; you'd really need to translate all markup to JSON (at which point you'd realize that JSON doesn't work well for markup languages).
But yes, you could use
something+json, as long as you register.
+yaml doesn't violate RFC 6839; but you would need to register it.
Generic software can use the suffix to select a parser. XMLHTTPRequest's support for
+xml is an example.