@hussfelt

Nothing is impossible, it might just be hard to solve. Autodidact technical creative geek, with a passion for doing the right thing. Director of Engineering @ proxy.com

© 2014. Henrik All rights reserved.

Understanding EmberJS and JSONApi 2.0

Summary

After working too many hours on a solution that was just wrong I finally figured out how to work with the serializers in Ember 1.1.13+.

The below should work for Ember 2.0 as well.

Solution

What I do below is let Ember do the magic of converting the payload from the old format to the new, I just use the new hooks defined in the blog-post EMBER DATA V1.13 RELEASED.

This should help you if you want to:

  • Change the payload and do some magic before hitting the store/model
  • Generally modify data returned from all endpoints in your API