Post view responses as JSON when accept header contains application/json