DS.JSONAPISerializer#normalize()

normalize (modelClass, resourceHash) Object Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:370 Parameters: modelClass DS.Model resourceHash Object the resource hash from the adapter Returns: Object the normalized resource hash

DS.JSONAPISerializer#modelNameFromPayloadType()

modelNameFromPayloadType (payloadType) Stringpublic Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:630 modelNameFromPayloadType can be used to change the mapping for a DS model name, taken from the value in the payload. Say your API namespaces the type of a model and returns the following payload for the post model: // GET /api/posts/1 { "data": { "id": 1, "type: "api::v1::post" } } By overwriting modelNameFromPayloadType you can specify that

DS.JSONAPISerializer#modelNameFromPayloadKey()

modelNameFromPayloadKey (key) String Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:350 Parameters: key String Returns: String the model's modelName

DS.JSONAPISerializer#keyForRelationship()

keyForRelationship (key, typeClass, method) String Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:427 keyForRelationship can be used to define a custom key when serializing and deserializing relationship properties. By default JSONAPISerializer follows the format used on the examples of http://jsonapi.org/format and uses dashes as word separators in relationship properties. This behaviour can be easily customized by extending this method. Example app/seria

DS.JSONAPISerializer#keyForAttribute()

keyForAttribute (key, method) String Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:397 keyForAttribute can be used to define rules for how to convert an attribute name in your model to a key in your JSON. By default JSONAPISerializer follows the format used on the examples of http://jsonapi.org/format and uses dashes as the word separator in the JSON attribute keys. This behaviour can be easily customized by extending this method. Example app/serializers/

DS.JSONAPISerializer#extractRelationships()

extractRelationships (modelClass, resourceHash) Object Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:299 Parameters: modelClass Object resourceHash Object Returns: Object

DS.JSONAPISerializer#extractRelationship()

extractRelationship (relationshipHash) Object Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:274 Parameters: relationshipHash Object Returns: Object

DS.JSONAPISerializer#extractAttributes()

extractAttributes (modelClass, resourceHash) Object Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:253 Parameters: modelClass DS.Model resourceHash Object Returns: Object

DS.JSONAPISerializer

DS.JSONAPISerializer Class Extends: DS.JSONSerializer Defined in: addon/serializers/json-api.js:14 Module: ember-data Ember Data 2.0 Serializer: In Ember Data a Serializer is used to serialize and deserialize records when they are transferred in and out of an external source. This process involves normalizing property names, transforming attribute values and serializing relationships. JSONAPISerializer supports the http://jsonapi.org/ spec and is the serializer recommended by Ember Data. T

DS.JSONAPIAdapter#updateRecord()

updateRecord (store, type, snapshot) Promise Inherited from DS.RESTAdapter but overwritten in addon/adapters/json-api.js:140 Parameters: store DS.Store type DS.Model snapshot DS.Snapshot Returns: Promise promise