Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

NativeJSON conflicting with older prototype.js libraries #410

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

crickeys commented Mar 29, 2012

Get rid of using Native JSON because it won't work if sites are using older versions of prototype.js. I know this is a fault of the older prototype.js libraries messing with .toJSON prototypes, but I keep running in to too many of my customers that have the old versions on their site and don't want to FORCE them to upgrade.

Maybe a better solution is to offer an option in socket.io-client to enable/disable using nativeJSON?

Get rid of using Native JSON because it won't work if sites are using…
… older versions of prototype.js. I know this is a fault of the older prototype.js libraries messing with .toJSON prototypes, but I keep running in to too many of my customers that have the old versions on their site and don't want to FORCE them to upgrade.


Maybe a better solution is to offer an option in socket.io-client to enable/disable using nativeJSON?
Contributor

crickeys commented Mar 29, 2012

I'm not sure how this might affect performance.

Contributor

3rd-Eden commented Mar 30, 2012

It will affect the performance badly, and you should be using feature detection to see if the browser & prototype combination is able to parse / stringify correctly. if this is not the case than it should be using the JSON.js library instead.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment