-
Notifications
You must be signed in to change notification settings - Fork 27
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
Circular structure jsonapi breaks deserializer #62
Comments
Not sure why , but this behaviour is intermittent. Now checking my tests in my app and all are passing where i expect the error. Using the below bring error on and off. {
"data": {
"id": "1677066013",
"type": "session",
"attributes": {
"user": 1,
"user_name": "qanisa",
"user_confirmed": true,
"ctas": {
"share_app": "pending",
"create_apps": "pending",
"use_sandbox": "done",
"create_integrations": "pending"
}
},
"relationships": {
"workspaces": {
"data": [{ "id": "1", "type": "workspace" }],
"meta": { "total": 1 },
"links": { "related": "https://example.com/workspaces" }
},
"messages": {
"data": [{ "id": "1", "type": "message" }],
"meta": { "total": 1 },
"links": { "related": "https://example.com/messages" }
},
"received_invites": {
"data": [],
"meta": { "total": 0 },
"links": { "related": "https://example.com/invites" }
},
"sent_invites": {
"data": [],
"meta": { "total": 0 },
"links": { "related": "https://example.com/invites" }
},
"user": {
"data": { "id": "1", "type": "user" },
"links": { "self": "https://example.com/users/1" }
}
},
"links": { "self": "https://example.com/auth/user" }
},
"included": [
{
"id": "1",
"type": "workspace",
"attributes": {
"name": "qanisa",
"signup_voucher_id": null,
"wallet_balance": "0.0",
"voucher_balance": "0.0",
"settings": null
},
"relationships": {
"memberships": {
"data": [{ "id": "1", "type": "membership" }],
"links": { "related": "https://example.com/memberships" }
},
"users": {
"data": [{ "id": "1", "type": "user" }],
"links": { "related": "https://example.com/users" }
},
"invites": {
"data": [],
"links": { "related": "https://example.com/invites" }
}
},
"links": { "self": "https://example.com/workspaces/1" }
},
{
"id": "1",
"type": "message",
"attributes": { "body": null, "status": "unread", "category": "devise" },
"relationships": { "user": { "data": { "id": "1", "type": "user" } } },
"links": { "self": "https://example.com/messages/1" }
},
{
"id": "1",
"type": "user",
"attributes": {
"email": "qanisa@mailinator.com",
"name": "qanisa",
"mobile_no": null,
"invitation_limit": 5,
"unconfirmed_email": null,
"email_confirmed": true
},
"relationships": {
"memberships": {
"data": [{ "id": "1", "type": "membership" }],
"links": { "related": "https://example.com/memberships" }
},
"workspaces": {
"data": [{ "id": "1", "type": "workspace" }],
"links": { "related": "https://example.com/workspaces" }
},
"received_invites": {
"data": [],
"links": { "related": "https://example.com/invites" }
},
"sent_invites": {
"data": [],
"links": { "related": "https://example.com/invites" }
},
"messages": {
"data": [{ "id": "1", "type": "message" }],
"links": { "related": "https://example.com/messages" }
}
},
"links": { "self": "https://example.com/users/1" }
}
]
} Any clue what's up? |
https://codedamn.com/news/javascript/how-to-fix-typeerror-converting-circular-structure-to-json-in-js Seems its a JSON.Stringify() error. |
Hi, Similar issue #3 |
The following JSONAPI response will break the deserializer
Error is
It's bsaiclly trying to do
test.question.answer.question.answer....
i am guessing.Perhaps have a limit to the depth of an option for depth to stop the circular reference.
The text was updated successfully, but these errors were encountered: