I am currently working on a project that requires interaction with the server and client. We plan to use Websockets and a server server (Jetty) Java. Therefore, messages sent must be interpreted from Java from the server and from JavaScript from the client.
Now we are thinking about the protocol and structure that messages should have. We already have a reference implementation that uses XML messages. But since JSON is intended for use with JavaScript, we are also thinking about the possibility of using JSON-Strings.
Messages will contain data that consists of XML strings and some meta-information necessary for processing this data (i.e. store it in a database, redirect it to other clients ...). It would be important for message processing (parsing and creation) to be simple and fast on the server and client side, since the application must use real-time speed.
Since we do not have time to test both technologies, I would be glad to have some suggestions based on personal experience or on technical aspects. Is one of the techniques more useful than the other, or are there any flaws in one of them?
Thanks in advance.
j0ker source share