Conflicts with JSON and other items if using prototype.js library
I've noticed that if you have the prototype.js library installed on your page then the socket.io-client isn't going to work right. I've narrowed down a few of the issues to the fact that the prototype.js library override Array's toJSON function. And if your browser has nativeJSON then the browser is going to call that toJSON function which is going to mess up functions like stringify which socket.io-client uses heavily.
The final problem being that if I emit something to the server it ends up being malformed and, in my case, ends up sending an ARRAY instead of an OBJECT.
I'm not sure the best approach here. Perhaps relying on nativeJSON should be removed?
Hi, any news on this? @crickeys, did you manage to work around this eventually?
easiest solution would be using JSON3 instead of JSON2 which detects all these fuckups.