For JSON text:
application/json
The MIME media type for JSON text is
application/json
. The default encoding is UTF-8. (Source: RFC 4627)
For JSONP (runnable JavaScript) with callback:
application/javascript
Here are some blog posts that were mentioned in the relevant comments:
- Why you shouldn’t use
text/html
for JSON - Internet Explorer sometimes has issues with
application/json
- A rather complete list of Mimetypes and what to use them for
- The official mime type list at IANA from @gnrfan’s answer below
Related Posts:
- What is the correct JSON content type?
- What is the correct JSON content type?
- How do I POST JSON data with cURL?
- How do I POST JSON data with cURL?
- How do I POST JSON data with cURL?
- Use of PUT vs PATCH methods in REST API real life scenarios
- Getting “java.io.IOException: An existing connection was forcibly closed by the remote host”
- How to do a PUT request with cURL?
- What’s the difference between text/xml vs application/xml for webservice response
- What are all the possible values for HTTP “Content-Type” header?
- How to use cURL to send Cookies?
- Proper MIME media type for PDF files
- HTTP GET with request body
- Using Wikipedia API on custom wikis like Bulbapedia
- SON Post with Customized HTTPHeader Field
- RestClientException: Could not extract response. no suitable HttpMessageConverter found
- How to POST JSON Data With PHP cURL?
- What is a MIME type?
- Why am I seeing “TypeError: string indices must be integers”?
- How to prettyprint a JSON file?
- What is the difference between POST and PUT in HTTP?
- What is the difference between POST and PUT in HTTP?
- Can comments be used in JSON?
- pandas read_json: “If using all scalar values, you must pass an index”
- Can comments be used in JSON?
- Parse JSON in JavaScript? [duplicate]
- JSON parsing error syntax error unexpected end of input
- SOAP vs REST (differences)
- Angular: ‘Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor only supports binding to Iterables such as Arrays’
- Why am I seeing “TypeError: string indices must be integers”?
- C# HttpClient An existing connection was forcibly closed by the remote host
- “SyntaxError: Unexpected token < in JSON at position 0"
- How to parse JSON in Java
- Grabbing the current viewer count for youtube live streaming
- “SyntaxError: Unexpected token < in JSON at position 0"
- How can I parse JSON with C#?
- JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- SyntaxError: Unexpected token o in JSON at position 1
- What is the easiest way to convert an Excel spreadsheet with tabular data to JSON? [closed]
- Converting dictionary to JSON
- Do I need Content-Type: application/octet-stream for file download?
- JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- SyntaxError: Unexpected token o in JSON at position 1
- What is JSONP, and why was it created?
- TypeError: Converting circular structure to JSON in nodejs
- Can comments be used in JSON?
- JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- 403 Forbidden vs 401 Unauthorized HTTP responses
- How to send a header using a HTTP request through a cURL call?
- application/x-www-form-urlencoded or multipart/form-data?
- Use a JSON array with objects with javascript
- Yahoo Finance All Currencies quote API Documentation
- How to parse data in JSON format?
- What is BSON and exactly how is it different from JSON?
- Array of JSON Objects
- Chrome sendrequest error: TypeError: Converting circular structure to JSON
- How to convert JSON to XML or XML to JSON?
- application/x-www-form-urlencoded or multipart/form-data?
- How to reformat JSON in Notepad++?
- Fetch: POST JSON data
- json.dumps vs flask.jsonify
- Select objects based on value of variable in object using jq
- Uncaught SyntaxError: Unexpected token u in JSON at position 0
- What does enctype=’multipart/form-data’ mean?
- Failed to load PDF document in Chrome
- TypeError: unhashable type: ‘dict’, when dict used as a key for another dict
- uncaught syntaxerror unexpected token U JSON
- What is the difference between YAML and JSON?
- Possible reason for NGINX 499 error codes
- How to install JQ on Mac on the command line?
- What does enctype=’multipart/form-data’ mean?
- Unexpected token u in JSON at position 0 (but only sometimes)
- How to read an external local JSON file in JavaScript?
- Representing null in JSON
- “CAUTION: provisional headers are shown” in Chrome debugger
- SyntaxError: Unexpected token o in JSON at position 1
- SyntaxError: Unexpected token o in JSON at position 1
- pretty-print JSON using JavaScript
- pretty-print JSON using JavaScript
- What is deserialize and serialize in JSON?
- How to read an external local JSON file in JavaScript?
- C/C++ JSON parser
- Fastest JSON reader/writer for C++
- @ converted to %40 in HTTPPost request
- System.Net.Http: missing from namespace? (using .net 4.5)
- Representing null in JSON
- What is the convention in JSON for empty vs. null?
- YAML equivalent of array of objects in JSON
- Are multi-line strings allowed in JSON?
- is not JSON serializable
- data.map is not a function
- Parsing a JSON string in Ruby
- Are multi-line strings allowed in JSON?
- What is the “right” JSON date format?
- How to make a class JSON serializable
- Convert a python dict to a string and back
- TypeError: Object of type ‘bytes’ is not JSON serializable
- Nested JSON objects – do I have to use arrays for everything?
- How to convert jsonString to JSONObject in Java
- Uncaught TypeError: Cannot read property ‘length’ of undefined