Set response encoding to json.