writeJsonString(): char -> unsigned char conversion with truncating the value to an octet is performed to prevent buffer overflow.