knowledgecode / WebSocket-for-Android

Cordova/PhoneGap plugin that makes WebSocket available on Android
Apache License 2.0
143 stars 53 forks source link

Newlines in JSON messages result in syntax error #10

Closed odbol closed 10 years ago

odbol commented 10 years ago

If the server sends JSON that has newlines in it, Cordova Javascript will barf with a syntax error. The createJsonForMessage() function should correctly escape newlines before sending.

Thanks for making this, by the way! Exactly what I needed!

knowledgecode commented 10 years ago

Thank you for pointing that out. I will fix it soon.

knowledgecode commented 10 years ago

I just fixed it.

Thanks a lot.

pathikdevani commented 10 years ago

better way to use byte array............this faster then JASON