Parse response as JSON if content-type matches