Comments (3)
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": "[email protected]",
"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?
from jsona.
https://codedamn.com/news/javascript/how-to-fix-typeerror-converting-circular-structure-to-json-in-js Seems its a JSON.Stringify() error.
from jsona.
Hi,
Serializing via JSON.stringify
is not supported for objects with circular relationships.
You need to serialize it using jsona.serialize({ stuff, includeNames })
first, then you can serialize the result using JSON.stringify
.
Similar issue #3
from jsona.
Related Issues (20)
- Browsers support HOT 1
- Deserialize `snake_case` to `camelCase` HOT 1
- switchChar meta to camelCased HOT 1
- Infinately nested relationships HOT 1
- Custom ModelsSerializer HOT 9
- Unclear how to change to camelCase HOT 1
- Keep relationship links when deserializing HOT 1
- `meta` property in relationship is dropped when deserializing HOT 10
- Cannot find module 'Jsona HOT 1
- Property 'next' does not exist on type 'TJsonApiBody' HOT 1
- Source map issue? HOT 3
- Switching nested attribute object keys to camel case is not working HOT 1
- Bug in deserialize: "included resources" data takes priority over "primary data" HOT 1
- When serializing with includeNames, only the first element of array is included in the resulting body if elements don't have id HOT 1
- RangeError: Maximum call stack size exceeded with jsona 1.10.1 not on older releases HOT 2
- Nested json api object is not properly deserilized HOT 1
- How to deserialize duplicate id without having duplicate result? HOT 1
- Incompatible with react-query HOT 4
- Error when using Jsona on Nuxt server side
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsona.