serializerFor (modelName) DS.Serializer
public
Returns an instance of the serializer for a given type. For example, serializerFor('person')
will return an instance of App.PersonSerializer
.
If no App.PersonSerializer
is found, this method will look for an App.ApplicationSerializer
(the default serializer for your entire application).
if no App.ApplicationSerializer
is found, it will attempt to get the defaultSerializer
from the PersonAdapter
(adapterFor('person')
).
If a serializer cannot be found on the adapter, it will fall back to an instance of DS.JSONSerializer
.
Parameters:
-
modelName
String
- the record to serialize
Please login to continue.