socket.io-client-java
socket.io-client-java copied to clipboard
Different data formats sent by `emit`
I compare events that we are trying to emit from the client side to the backend. After comparing these samples:
- JS:
42["sendMessage",{"chatId":"62519549325a40c72576938d","messageText":"gh"}] - Android:
42["sendMessage","{"messageText":"gh","chatId":"62519549325a40c72576938d"}"]As you can see from the sample above, the parsed message from android differs from the JS one. In JS socket io puts data as anobject, from the other hand android puts data as astring.
Android version of sample request caused because Socke.IO puts event and data to the JSONArray. And after parsing the JSONArray it puts all entries as a string
Can it be handled on the server-side(for example just to edit some configuration) or do we require updates from the Socket.IO library?
Thanks in advance!