Wrong message length in <DATALEN> section

Wrong binary operations with $json_length variable. That is why messages with length more than 2048 bytes can not be sent correctly. The response from server was just "OK".