update decorator to use request.json when the Content-Type header is set to JSON