gcrabtree / react-native-socketio

Not Maintained! A React Native wrapper for both the Swift and Java Socket.Io clients.
MIT License
152 stars 55 forks source link

can't parse String type,when node call emit('eventName', JSON.stringify({name:'hj',age:23})); #30

Open huangjilaiqin opened 7 years ago

huangjilaiqin commented 7 years ago

I use nodejs as server,when I call emit('change',{name:'hj',age:23}); is ok, client can get the obj, but when I call emit('change',JSON.stringify({name:'hj',age:23})); I get always get null. the way solved the problem. change the code below the file:(the red code is add) .../node_modules/react-native-socketio/android/src/main/java/com/gcrabtree/rctsocketio/SocketIoJSONUtil.java image

huangjilaiqin commented 7 years ago

@gcrabtree can u fix the problem.