Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

primaryData key during deserialize in JSONAPI source #134

Closed
jakubrohleder opened this issue Apr 15, 2015 · 3 comments
Closed

primaryData key during deserialize in JSONAPI source #134

jakubrohleder opened this issue Apr 15, 2015 · 3 comments

Comments

@jakubrohleder
Copy link

Hi! I'm testing a sample app using angular.js and Rails backend using jsonapi-resources. Unfortunatelly I've encountered a problem during data synchronization:

Deserialize method in JSONAPISerializer uses [resourceType] as a key for primary data, while in my server response (as well as in jsonapi specification), primary data appears under a top-level key named "data".

Is it somehow my fault, or it should be that way?

@dgeb
Copy link
Member

dgeb commented May 4, 2015

Sorry for the inconsistencies with jsonapi-resources, and the JSON API spec itself.

I'm working on bringing the JSONAPISource up to date with the spec this week, and will be tracking progress via #113. My goal is complete compliance by the JSON API 1.0 release date - May 21.

@pixelhandler
Copy link

@jakubrohleder @dgeb yeah I ran into that as well. I created a blog api here using the JSON resources gem - https://github.com/pixelhandler/blog-api/ the client app needed some workarounds in the JSONAPISource like so https://github.com/pixelhandler/blog/blob/master/app/adapters/application.js https://github.com/pixelhandler/blog/blob/master/app/adapters/application.js I'd be willing to contribute updates to the JSONAPI Source/Serializer if needed. (could pick this up this Friday)

@dgeb
Copy link
Member

dgeb commented Jun 19, 2015

This should be addressed via #156.

Sorry for the delay in reaching JSON API 1.0 compliance.

@dgeb dgeb closed this as completed Jun 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants