简体   繁体   English

JSON.parse()用于类型为application / octet-stream的对象

[英]JSON.parse() for an Object of type application/octet-stream

I have a JSON stream of type application/octet-stream . 我有一个类型为application/octet-stream的JSON application/octet-stream I need to parse this using JSON.parse() or similar? 我需要使用JSON.parse()或类似的解析? How can I achieve this? 我该如何实现?

application/octet-stream is the MIME type for "Uh, I dunno, it's some bytes". application/octet-stream是“呃,我不知道,它是一些字节”的MIME类型。

Either you have JSON which hasn't been correctly labelled and you can simply use JSON.parse as normal or you have something else and you need to identify what it is and why you have it. 要么拥有未正确标记的JSON,要么可以像往常一样简单地使用JSON.parse ,或者有其他东西,则需要确定它是什么以及为什么拥有它。

This could be anything from "It is gzipped JSON that you need to gunzip before parsing as JSON" to "It is corrupted nonsense and you need to fix whatever is generating it". 可能是“解析为JSON之前需要先压缩成zip格式的JSON”到“它已被废掉并且您需要修复生成它的任何内容”之类的内容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在canvas.toDataUrl中使用'application / octet-stream'mime类型 - use 'application/octet-stream' mime type in canvas.toDataUrl application/octet-stream 内容类型获取空请求正文 - application/octet-stream Content Type get null request body 资源解释为Image但使用MIME类型application / octet-stream传输 - Resource interpreted as Image but transferred with MIME type application/octet-stream 如何将 Blob(八位字节流)读取到 JSON 对象? - How to read Blob (octet-stream) to JSON object? 八位字节流到 PNG - Octet-stream to PNG HTML文件上传:有没有办法强制content-type =“application / octet-stream” - HTML file upload: is there a way to force content-type=“application/octet-stream” 拒绝应用样式,因为它的 MIME 类型('application/octet-stream') - Refused to apply style because its MIME type ('application/octet-stream') 接收和解释以内容类型作为应用程序/八位字节流发送的十六进制数据时出错 - Error in receiving and interpreting hexadecimal data send with content type as application/octet-stream 使用 firebase 的 putString() 上传 base64 png 会在存储中给我一个“类型:应用程序/八位字节流” - Uploading a base64 png with firebase's putString() gives me a 'type: application/octet-stream' in storage Windows 10,资源解释为样式表,但以MIME类型application / octet-stream传输 - Windows 10, resource interpreted as Stylesheet but transferred with MIME type application/octet-stream
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM