Update json.c

a cast to unsigned char was needed on my 64 bit machine to handle utf8-encoded strings correctly.