More work getting the web client talking to the server
Encode the output messages in JSON, now at the brains