【发布时间】:2020-08-02 21:33:18
【问题描述】:
我使用 Visual Code Studio 作为我的 IDE,并想编写一个简单的 sn-p 用于打印:
printf("%d", );
sn-p:
"Print": {
"prefix": "printf",
"body": [
"printf("%d",$1);",
"$2"
],
"description": "print"
}
它是一个 JSON 文件,但是它给了我一个错误 %d 并且不将 %d 视为字符串,我想。错误是:Expected commajson(514)
【问题讨论】:
-
您在 sn-p 中需要
\"而不是"。 Take a look at this. -
printf 的 " 弄乱了你的 json
标签: c json visual-studio-code printing code-snippets