Made json protocol a bit pickier about messages.