Implemented JSON parsing on client side

The data transmitted through the web socket now correctly renders on
the client side. This also includes updates for error handling when
sending invalid data through the web socket.