I have a huge list of things with each of those things broken down into four sub-things. I am easily able to gather them in nested arrays in PHP, but when I use json_encode to pass them as a JSON object to my javascript client side, the JSON.parse() function always fails because my data is filled with all kinds of entities like ' / \ " & % {} []
It's a shame there is no constant that you can add to json_encode to ensure it's javascript ready.
What characters must I escape or otherwise deal with to ensure I get a javascript parsable object. I was unable to find one. I could easily write a function to handle this if I knew which characters to deal with.