JSON-API-SPEC
Spec JSON REST structure Yehuda Katz.
Définition
JSON:API v1.1 (publié octobre 2022) inclut : top-level objects data/errors/meta/jsonapi/links/included, resource objects (type, id, attributes, relationships, links, meta), sparse fieldsets (?fields[type]=name), filtering, pagination, sorting standardisés. Content-Type application/vnd.api+json. Adopte JSON Schema. Implémentations : Ember Data, Yii2 framework, jsonapi-ruby, jsonapi-server-node.
Origine
JSON:API v1.0 publie 29 mai 2015 par Yehuda Katz et Steve Klabnik ; v1.1 publie 19 octobre 2022.
Exemple en contexte
Une API JSON:API retourne data:{type:'orders',id:'42',attributes:{total:99},relationships:{customer:{data:{type:'customers',id:'7'}}}},included:[...].
Termes liés
- HAL — autre format JSON.