Converting Circular to JSON
Unanswered
Giant wood wasp posted this in #help-forum
Giant wood waspOP
I'm getting this error but im not converting it to json! (Context im upgrading my project to next v15)
So i got 2 classes which are relevant: Player and Group.
Player has a reference to a Group and a Group to multiple Players
When i generate my data it converts all nice and well into classes but when i pass it back to the page it gives me the previous error.
Is there something new where i can't convert my data anymore?
⨯ TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Group'
| property 'players' -> object with constructor 'Array'
| index 0 -> object with constructor 'Player'
--- property 'group' closes the circle
at stringify (<anonymous>)
at Home (/Users/tazio/Desktop/Personal/f1-nr10-app/.next/server/chunks/ssr/[root of the server]__1b6b1c._.js:2160:13)
digest: "1897929333"
So i got 2 classes which are relevant: Player and Group.
Player has a reference to a Group and a Group to multiple Players
When i generate my data it converts all nice and well into classes but when i pass it back to the page it gives me the previous error.
Is there something new where i can't convert my data anymore?