简体   繁体   English

用INTO双引号代替?

[英]Substituting INTO double quotes?

How do I substitute a thing INTO the double quotes: 如何将事物替换为双引号:

curl -u "bk322:$passw" https://api.github.com/user/repos -d "{'name':"$title"}"

I can't make it 我做不到

"{'name':\"$title\"}"

because this way JSON parser doesn't understand what I mean. 因为这种方式JSON解析器无法理解我的意思。

I have a feeling that it's the single-quotes that your JSON parser doesn't like. 我觉得这是JSON解析器不喜欢的单引号。

Try: 尝试:

curl -u "bk322:$passw" https://api.github.com/user/repos -d "{\"name\":\"$title\"}"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM