What is the correct Content Type for JSON? [Curl/Bash Code]

The official MIME type for JSON (JavaScript Object Notation) is application/json, and the default encoding is UTF-8. For JSONP (padded JSON), the correct content type is application/javascript. For JSON-LD (JSON linked data), the correct content type is application/ld+json. There are some legacy content types for JSON that should be avoided (text/json, text/x-json, text/javascript, etc.). The Curl/Bash code was automatically generated for the JSON Content Type example.
Loading...