I have a JSON stream of type application/octet-stream
. I need to parse this using JSON.parse()
or similar? How can I achieve this?
application/octet-stream
is the MIME type for "Uh, I dunno, it's some bytes".
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.
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".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.