Skip to content
Blair edited this page Jan 27, 2016 · 7 revisions

#js-data-jsonapi

##JsonApi Data Adapter for js-data Is an adapter for the popular js-data library that enables js-data to communicate witha a JsonApi compliant server implementing the JsonApi Protocol.

It ties:

  • JsonApi types <--> js-data resource
  • JsonApi relations <--> js-data toOne, toMany Relationships
  • Derives js-data parent relationships from JsonApi data

JsonApi embraces the principles of HATEOAS. It enforces standards for describing data relationships that enable us to refer to relationships by name and to not need to be concerned with the actual url that the related resource exists at on the server. This is great as the server can server any arbitrary url containing whatever structure and parameter extensions and a client application can just use it without having to understand the details of the url but instead just the resource that it servers.

This adapter aims to make use of this and allow client code to be abstracted from the mechanics of server urls and instead to work with data relationships instead. Where the client Api deals with and knows about relationship types and is not concerned with Urls. As with the principles of HATEOAS from a single entry point the client should be able to navigate all the resources available to it by following relationships (without having to calculate/guess any Urls) from a single entry Url.

Clone this wiki locally