We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
included
JSON:API payload
{ "data": { "type": "article", "id": "1", "attributes": { "title": "title" }, "relationships": { "author": { "data": { "type": "user", "id": "1" } } } }, "included": [ { "type": "user", "id": "1", "attributes": { "email": "user@example.com" }, "relationships": { "profile": { "data": { "type": "profile", "id": "1" } } } }, { "type": "profile", "id": "1", "attributes": { "firstName": "first-name", "lastName": "last-name" }, "relationships": { "user": { "data": { "type": "user", "id": "1" } } } } ] }
Serializers
Serializer.register('article', { relationships: { author: { type: 'user' }, }, }); Serializer.register('user', { relationships: { profile: { type: 'profile' }, }, }); Serializer.register('profile', { relationships: { user: { type: 'user' }, }, });
Expected result
{ id: '1'. title: 'title', author: { id: '1'. email: 'user@example.com', profile: { id: '1'. firstName: 'first-name', } } }
or
{ id: '1'. title: 'title', author: { id: '1'. email: 'user@example.com', profile: { id: '1'. firstName: 'first-name', user: '1' } } }
Actual ErrorMaximum call stack size exceeded
It may be useful to have beforeDeserialize hook or ignoreIncluded relationship option
beforeDeserialize
ignoreIncluded
The text was updated successfully, but these errors were encountered:
prevent circular deserialization
9af5b71
fix "Maximum call stack size exceeded" error. closes #106
prevent circular deserialization (#107)
a7b4e88
fix "Maximum call stack size exceeded" error. closes #106 #107
danivek
Successfully merging a pull request may close this issue.
JSON:API payload
Serializers
Expected result
or
Actual ErrorMaximum call stack size exceeded
It may be useful to have
beforeDeserialize
hook orignoreIncluded
relationship optionThe text was updated successfully, but these errors were encountered: