JSON:API (https://jsonapi.org/format/1.1/) has actually been published but has not yet been ratified as of the time of writing. The formatting and available tags are more complex and diverse than with JSend. Reading through the documentation on JSON:API, you can see that the guidelines are much more rigid and precise than JSend.Â
JSON:API has the following accepted Content-Type header value:
Content-Type: application/vnd.api+json
This means that if the Accept header in a client request specifies this content type, your application is expected to respond with a JSON:API-formatted JSON response. If the Content-Type header of a client request uses the value shown, your REST application needs to understand this formatting.Â
Top-level keys in a JSON:API-formatted request or response must include at least one of the following: meta, data, or errors. In addition, the jsonapi, links, and included top-level keys are available for use. The resulting document can end up being...