const reader = new FileReader();
reader.readAsText(res.data, 'utf-8');
reader.onload = function () {
console.log(reader.result)
// const t = JSON.parse(reader.result as string); // 这里就得到了json
}
JS处理二进制文件流转为JSON格式
于 2022-12-02 17:21:19 首次发布