{“ errorMessages”:[“意外字符('''(代码39)):期望为有效值 [英] {"errorMessages":["Unexpected character (''' (code 39)): expected a valid value
问题描述
我从此处。
并尝试使用类似命令中的curl命令。通过在Windows中引用此安装curl 。
And tried to use curl command from command like. Installed curl by refering this for windows.
这是我的CURL字符串:
Here is my CURL string:
curl -D- -u admin:password -X POST -H "Content-Type: application/json" --data
'{"jql":"project = CI","startAt":0,"maxResults":50,"fields":["summary","status","assignee"]}'
"https://myclientname.atlassian.net/rest/api/2/search"
这就是我正在做的错误:
This is how I'm doing and getting error:
{"errorMessages":["Unexpected character (''' (code 39)): expected a valid value
(number, String, array, object, 'true', 'false' or 'null')\n
at [Source: org.apache.catalina.connector.CoyoteInputStream@1626cb2; line: 1, column: 2]"]}
在Windows中制作此卷曲字符串是否有问题?请提出建议?我该如何更正并获取JSON对象?请注意,用户名,密码和客户端名称正确。谢谢。
Is there any problem making this curl string in windows? Please suggest? How can I correct this and get JSON object? Please note that, userID, password and client name is correct. Thanks.
推荐答案
似乎是Windows问题。请勿使用'
(单引号)字符。
Seems to be an windows issue. Do not use the '
(single-quote) character.
相反,请使用
(双引号)字符括住字符串。然后,如果您有内引号,请使用
(3个双引号)
Instead, use "
(double-quote) character for enclosing the string. Then, if you have inner quotes, use """
(3x double-quotes) to escape them.
示例: {名称: Frodo,年龄 :123}
这篇关于{“ errorMessages”:[“意外字符('''(代码39)):期望为有效值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!