Json ist undefiniert in cURL

Ich automatisieren müssen die Probleme, die Eingliederung in Jira, so dass ich brauchen, um eine REST-API, ich führe curl aus der Befehlszeile, hier ist mein Befehl

C:\WINDOWS\system32>curl.exe -D- -u fred:fred -X POST --data { "fields": {"project": { "key"="ZZZ-180" }, "summary": "REST TESTING" , "description": "Creation of a testing issue" , "issuretype" { "name": "Bug"}}} -H "Content-Type: application/json" http://ABCD.com:XXXX/rest/api/2/issue/

und hier ist, was ich erhalten:

curl: (6) Could not resolve host: fields
curl: (3) [globbing] unmatched brace at pos 10
curl: (3) [globbing] unmatched brace at pos 2
curl: (6) Could not resolve host: key=
curl: (6) Could not resolve host: ZZZ-180
curl: (3) [globbing] unmatched close brace/bracket at pos 1
curl: (6) Could not resolve host: summary
curl: (6) Could not resolve host: REST TESTING
curl: (6) Could not resolve host: ,
curl: (6) Could not resolve host: description
curl: (6) Could not resolve host: Creating of a testing issue
curl: (6) Could not resolve host: ,
curl: (6) Could not resolve host: issuretype
curl: (3) [globbing] unmatched brace at pos 2
curl: (6) Could not resolve host: name
curl: (3) [globbing] unmatched close brace/bracket at pos 4

Kann mir jemand helfen, lassen Sie die locken definieren Sie den JSON-code geschrieben Daten?

  • Sie haben um die Angabe der parameter, sonst curl verwenden { als Daten und interpretieren Sie die anderen Teile als Parameter (unbekannt)...
  • Ich habe versucht, aber immer noch der gleiche Fehler
  • auch das entfernen der Leerzeichen {"fields":{
  • Mein Fall war das Leerzeichen am string. So ungewöhnlich zu meinem Verständnis. Danke.
Schreibe einen Kommentar