CURL -X POST无法解析给定的JSON

我编写了以下HTTP请求:

curl  -X POST -H "Authorization: Bearer xxxxxxx " -H "Content-Type: application/json" -d file.json 'https://company.xxxxx.databricks.com/api/2.0/clusters/create'

file.json的内容是:

 {
  "cluster_name": "my-cluster","spark_version": "5.3.x-scala2.11","node_type_id": "i3.xlarge","spark_conf": {
    "spark.speculation": true
  },"aws_attributes": {
    "availability": "SPOT","zone_id": "us-west-2a"
  },"num_workers": 25
}

不幸的是,我收到以下错误:

{"error_code":"MALFORMED_REQUEST","message":"Invalid JSON given in the body of the request - failed to parse given JSON"}% 

请问如何解决此问题

yunmengyao1_ 回答:CURL -X POST无法解析给定的JSON

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3107243.html

大家都在问