http-headers - content-type': 'application/json fetch - What is the correct JSON content type?

content-type application/json example / json / content-type

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.

I have seen so many purported "standards" for the JSON content type:

application/json
application/x-javascript
text/javascript
text/x-javascript
text/x-json

Alec



Answer #1
{ "Name": "Foo", "Id": 1234, "Rank": 7 }
functionCall({"Name": "Foo", "Id": 1234, "Rank": 7});