Open jackwilsdon opened 7 years ago
With the current implementation unfortunately what you want is not possible. Here is why; when traversing a struct's relations the library has no idea what it has or hasn't already visited. Therefore when serializing a many to many it gets stuck in an infinite loop until eventually the stack frame limit has been exceeded.
To fix this we need to store the things that have already been visited and serialized. If they are encountered again they should be ignored.
@aren55555 I've just encountered this same issue. Any hint as to the best place to look in order to try and create a PR to fix
Is it possible to marshal a many-to-many relationship with
jsonapi
? I end up getting a stack overflow panic when trying to do so.