Use json function on response object which gives proper exception if unparsable