Note that there are some explanatory texts on larger screens.

plurals
  1. POEmber Data Beta 2 - Serializer/Deserializer for FixtureAdapter
    text
    copied!<p>As I understand it, <code>DS.FixtureAdapter</code> doesn't use a serializer by default. Is this correct?</p> <p>I'm mainly trying to get custom transforms working with the fixture adapter. I see <code>DS.JSONSerializer</code> calls the deserialize method of the transform <a href="https://github.com/emberjs/data/blob/master/packages/ember-data/lib/serializers/json_serializer.js#L14" rel="nofollow">here</a>, but over <a href="https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/fixture_adapter.js#L28" rel="nofollow">here in the fixture adapter</a> the <code>serializer</code> property is set to <code>null</code>. It also looks like all the fixture adapter's find methods return the fixtures <a href="https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/fixture_adapter.js#L162" rel="nofollow">directly</a>.</p> <p>In comparison, <code>DS.RESTAdapter</code> has its <code>ajax</code> method, which <a href="https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/rest_adapter.js#L391" rel="nofollow">claims</a> to call the proper flavor of <code>extract</code> from the serializer. However, I don't see where this is done. Where in source does this occur?</p> <p>Is there a property or something that I can override to hook the fixture adapter up with a serializer? (I tried <code>serializer: DS.JSONSerializer</code> in my fixture adapter, but this just seems to block all data from being loaded.) Or am I looking at modifying the source being the only solution? If so, knowing where/how the REST adapter invokes <code>extractSingle</code>/<code>extractArray</code> would be amazing.</p> <p>I appreciate any help I can get. I'm at a bit of a dead end with this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload