Should I migrate to jsonapi? (when switching to orbit)

I currently make use of a custom format for our backend responses, which pretty much is designed to be as simplistic/small as possible. Currently the ember app uses ember-data, but I am having plans to move to ember-orbit as we would like to offer better support for things like an offline mode.

I had been looking into using jsonapi previously, but in the end I never made the change, because jsonapi seems to be somewhat verbose (and taking that step always means a big change - both with ember and the backend).

However, there are a few additional things:

  • Using jsonapi would mean less customisations with ember-data/orbit due to jsonapi support
  • On the java backend there seems to be a nice library in order to support jsonapi (crnk-framework)
  • Responses are compressed, so being more verbose doesn’t necessarily mean a noteworthy increase in payload size
  • It will make it more easier to let the client specify which child entities need to be included in the response

Given that our app is somewhat complex by now, I am still hesitant if I really should start to migrate to jsonapi. Doing it together with moving to orbit, however, seems like a reasonable idea.

So, if you migrated from a custom format to jsonapi, I am interested in your experience. Do you think it was worthwhile in the end? Did you encounter any noticeable performance impacts or other issues?

I think what you said about having good library support on both client and server is key. As long as you have that, it’s worth it, because you get a lot less code to write and maintain on your own and you can lean on the libraries.

I probably wouldn’t try to implement the spec by hand unless the server was going to be extremely small and limited.

1 Like

Thank you. Yes, that’s one of my regular pain points: having to fiddle with serialisers and adapters to make ED accept any new data that gets added to the app.

I wouldn’t want to do it, unless there is a framework for our backend, because that will likely be a lot of additional work and complexity.

There just has been a nice blog post about moving from ED to orbit: I think I will give it a try with a few models and endpoints that I can isolate and see how it goes.