Sorry, forgot to add that the error is in the debugging console. I know why this is happening, of course. The parent references the children references the parent etc. and so serialization would cause an infinite loop.
I have tried using the [name].prototype.toJSON method to exclude the parent from serialization, but it does not seem to work.