I have two processes: a server process, written in Python, and a client written in Java. These two programs will communicate via sockets, and I am about to begin writing the code to handle this.
I am currently intending to send messages between the two in a JSON format that will provide data and/or instructions for the other process to handle - for example, there would be a sort of "type" variable that would define the nature of the message, such as "error", "get", "set", etc.
However, I am wondering if there is a simpler and/or more direct way of formatting this communication, or if anyone has advice about doing this sort of thing, that would be greatly appreciated.
Thanks for your suggestions.