Open pkrumins opened 8 years ago
Hi, I'm not too sure how socket.io imports JSON3 and uses it, but typically it should be available as JSON.stringify
(uppercase, not lowercase). Does that work for you? We also export it as JSON3.stringify
too for browsers, unless the socket.io client uses some code compiler like browserify/webpack.
The code works in IE8 and newer IEs, it's just it doesn't work in IE7. I'm not familiar how socket.io-client imports JSON3 either. That screenshot is from socket.io-client. Here is that place on github:
I haven't tested if JSON.stringify
works as I found a workaround via json.JSON.stringify
for IE7 (I live patched client's socket.io.js.)
Hello there,
Today at Browserling I had to debug an issue for a customer in IE7. He was using socket.io (latest v1.3.7), that uses json3.
I found out that in IE7
json.stringify
is undefined, howeverjson.JSON.stringify
is defined.Here's a screenshot from debugger attached to IE7 that shows the problem (it's in socket.io-client.js):
I'm not sure if it's json3 issue, or socket.io-client.js issue, but as a workaround I'm simply using
json.JSON.stringify
in that place. I thought I'd let you know.P. Krumins