DS.JSONSerializer#normalizeAttributes()

normalizeAttributesprivate Defined in addon/serializers/json.js:727

DS.JSONSerializer#normalizeCreateRecordResponse()

normalizeCreateRecordResponse (store, primaryModelClass, payload, id, requestType) Object Defined in addon/serializers/json.js:360 Available since 1.13.0 Parameters: store DS.Store primaryModelClass DS.Model payload Object id String|Number requestType String Returns: Object JSON-API Document

DS.JSONSerializer#modelNameFromPayloadKey()

modelNameFromPayloadKey (key) String Defined in addon/serializers/json.js:716 Parameters: key String Returns: String the model's modelName

DS.JSONSerializer#modelNameFromPayloadType()

modelNameFromPayloadType (type) Stringpublic Defined in addon/serializers/json.js:1520 Parameters: type String Returns: String the model's modelName

DS.JSONSerializer#normalize()

normalize (typeClass, hash) Object Inherited from DS.Serializer but overwritten in addon/serializers/json.js:491 Normalizes a part of the JSON payload returned by the server. You should override this method, munge the hash and call super if you have generic normalization to do. It takes the type of the record that is being normalized (as a DS.Model class), the property where the hash was originally found, and the hash to normalize. You can use this method, for example, to normalize undersco

DS.JSONSerializer#keyForRelationship()

keyForRelationship (key, typeClass, method) String Defined in addon/serializers/json.js:1458 keyForRelationship can be used to define a custom key when serializing and deserializing relationship properties. By default JSONSerializer does not provide an implementation of this method. Example app/serializers/post.js import DS from 'ember-data'; export default DS.JSONSerializer.extend({ keyForRelationship: function(key, relationship, method) { return 'rel_' + Ember.String.underscore

DS.JSONSerializer#keyForAttribute()

keyForAttribute (key, method) String Defined in addon/serializers/json.js:1433 keyForAttribute can be used to define rules for how to convert an attribute name in your model to a key in your JSON. Example app/serializers/application.js import DS from 'ember-data'; export default DS.RESTSerializer.extend({ keyForAttribute: function(attr, method) { return Ember.String.underscore(attr).toUpperCase(); } }); Parameters: key String method String Returns: String normalized k

DS.JSONSerializer#keyForLink()

keyForLink (key, kind) String Defined in addon/serializers/json.js:1485 keyForLink can be used to define a custom key when deserializing link properties. Parameters: key String kind String `belongsTo` or `hasMany` Returns: String normalized key

DS.JSONSerializer#extractRelationship()

extractRelationship (relationshipModelName, relationshipHash) Object Defined in addon/serializers/json.js:588 Returns a relationship formatted as a JSON-API "relationship object". http://jsonapi.org/format/#document-resource-object-relationships Parameters: relationshipModelName Object relationshipHash Object Returns: Object

DS.JSONSerializer#extractRelationships()

extractRelationships (modelClass, resourceHash) Object Defined in addon/serializers/json.js:660 Returns the resource's relationships formatted as a JSON-API "relationships object". http://jsonapi.org/format/#document-resource-object-relationships Parameters: modelClass Object resourceHash Object Returns: Object