In my web app, I have some complex objects written with JavaScript (ie nested arrays, objects within objects withing objects, etc) and the nature of my app relies on these. I need to send all the data to PHP so that I can save it to the database. What is an efficient, easy way to send my objects to PHP? I tried JSON, but got strange errors like 'too much recursion', which I'm guessing means that my objects are too complex for it. So is there a good library of script that will do this? Thanks in advance.
EDIT:
So JSON then. I tried updating the JSON library to no avail, and I am now looking for cyclic references.