{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/9340","labels_url":"https://api.github.com/repos/laravel/framework/issues/9340/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/9340/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/9340/events","html_url":"https://github.com/laravel/framework/pull/9340","id":89611625,"number":9340,"title":"[5.1] Added Robust REQUEST Content Type Parsing","user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laravel/framework/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/laravel/framework/labels/proposal","name":"proposal","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-19T16:54:32Z","updated_at":"2015-06-19T18:59:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/9340","html_url":"https://github.com/laravel/framework/pull/9340","diff_url":"https://github.com/laravel/framework/pull/9340.diff","patch_url":"https://github.com/laravel/framework/pull/9340.patch"},"body":"This also fixes a small issues with the accept header, and abstracts some code both use.\r\n\r\nNote that the accept header parsing code and the request content type parsing code call matchesType with paramaters in the reverse order."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/113606630","html_url":"https://github.com/laravel/framework/pull/9340#issuecomment-113606630","issue_url":"https://api.github.com/repos/laravel/framework/issues/9340","id":113606630,"user":{"login":"JerseyMilker","id":5187394,"avatar_url":"https://avatars.githubusercontent.com/u/5187394?v=3","gravatar_id":"","url":"https://api.github.com/users/JerseyMilker","html_url":"https://github.com/JerseyMilker","followers_url":"https://api.github.com/users/JerseyMilker/followers","following_url":"https://api.github.com/users/JerseyMilker/following{/other_user}","gists_url":"https://api.github.com/users/JerseyMilker/gists{/gist_id}","starred_url":"https://api.github.com/users/JerseyMilker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JerseyMilker/subscriptions","organizations_url":"https://api.github.com/users/JerseyMilker/orgs","repos_url":"https://api.github.com/users/JerseyMilker/repos","events_url":"https://api.github.com/users/JerseyMilker/events{/privacy}","received_events_url":"https://api.github.com/users/JerseyMilker/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T18:59:24Z","updated_at":"2015-06-19T18:59:24Z","body":"`application/json` is the only valid mimetype for a JSON file.  It's a shame jsonapi.org and similar enforce a non-standard content-type for request header.  After all, jsonapi.org is still enforcing valid JSON syntax, it's just opinionated on how that JSON is structured for API use cases (schema convention, key naming, nesting, etc.).\r\n\r\nAll that said, I still agree with this PR.  Whether I agree with jsonapi.org's implementation or not, if someone chooses to send a JSON request using jsonapi.org convention, `isJson()` method should still return true, because it will be JSON data coming in.\r\n\r\nRegarding `text/json`, unless another API convention similar to jsonapi.org uses this, I don't see reason to account for it.  I think `isJson()` should be as strict as possible, while allowing for API conventions like jsonapi.org, HAL, etc."}}