fix nullbyte issue in json