for 'url' you might write in in the 'main' field.
For quoting it could be written this way '--key
题
In my package.json file for node-webkit I have: "chromium-args" : "--url="http://www.google.com""
I tried to use use backslashes \"www.google.com\", but webkit seems to not open at all when uses blackslashes. If I leave the blackslashes out, webkit loads the window but produces a JSON syntax error.
package.json file code:
{
"main": "index.html",
"name": "nw-demo",
"description": "demo app of node-webkit",
"version": "0.1.0",
"keywords": [ "demo", "node-webkit" ],
"window": {
"icon": "link.png",
"toolbar": true,
"width": 800,
"height": 500,
"position": "mouse",
"min_width": 400,
"min_height": 200,
"max_width": 800,
"max_height": 600
},
"webkit": {
"plugin": true
},
"chromium-args" : "--url=\"http://www.google.com\""
}
What is the correct json syntax to for "chromium-args"?
解决方案
for 'url' you might write in in the 'main' field.
For quoting it could be written this way '--key
其他提示
Instead of double quotes use single quotes
"chromium-args" : "--url='http://www.google.com'"