I've been messing around with JSON for some time, just pushing it out as text and it hasn't hurt anybody (that I know of), but I'd like to start doing things properly.
(我一直在弄乱JSON一段时间,只是将其作为文本推出,并没有伤害任何人(据我所知),但是我想正确地做事。)
I have seen so many purported "standards" for the JSON content type:
(我见过这么多的所谓的“标准”为JSON内容类型:)
application/json
application/x-javascript
text/javascript
text/x-javascript
text/x-json
But which one is correct, or best?
(但是哪一个是正确的,还是最好的?)
I gather that there are security and browser support issues varying between them. (我发现在它们之间存在安全性和浏览器支持问题。)
I know there's a similar question, What MIME type if JSON is being returned by a REST API?
(我知道有一个类似的问题, 如果REST API返回JSON,则为哪种MIME类型?)
, but I'd like a slightly more targeted answer. (,但我想要一个更有针对性的答案。)
ask by Oli translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…