-1
{ 
    "name": "Supreme Bot", 
    "description": "Automate the checkout process for supremenewyork.com!", 
    "version": "1.0.3", 
    "manifest_version": 2, 
    "permissions": ["*://*/*"], 
    "content_scripts": [ 
    { 
     "matches": ["*://*.supreme.com/*"], 
     "js": ["jquery.js", "supreme.js"] 
    } 
    ], 
    "browser_action": { 
    "default_icon" : "icon-16.png", 
    "default_title": "Enable/Disable" 
    }, 
    "background": { 
    "scripts": ["background.js"], 
    "persistent": false 
    }, 
    "icons": { 
    "16": "icon-16.png" 

    }, 
    { //this line is showing up as an error that says manifest is not valid json 
//dictionary keys must be quoted 
    "name": "Supreme Bot", 
    ... 
    "options_page": "options.html", 
    ... 
    } 
} 

나는 의류 구매를 위해 자동 채우기 및 자동 체크 아웃을하고 있습니다. 크기를 조정할 수 있도록 옵션 페이지를 추가하려고합니다 (코드가 다른 파일에 있음). 25 행 6 열은 사전 키를 인용해야하는 구문 오류가 있음을 나타냅니다. 어떤 아이디어?manifest.json 문제 : 사전 키는 따옴표로 묶여 야합니다.

+1

왜 문제가되는 줄 앞에 여분의'{'가 있습니까? 그리고 왜 당신은 "이름"을 반복하고 있습니까? "최고 봇"? – Teepeemm

+0

글쎄, 오류 상태로 구문 오류입니다. 당신은 분명히 그곳에''그럴 필요가 없습니다. 파일의 구조는 JSON을 사용하여 Object를 나타냅니다. 이것은 "key": "Value"쌍이 있음을 의미합니다. 맨손 개체는 허용되지 않습니다. "이름"을 복제했습니다 : "최고가 봇", 그리고 많은'... '을 남겼습니다. 왜 그런 생각을하지 않았는지 당신이 생각하는 이유는 정확합니다. 전체 파일을 제공하고 왜이 여분의 부분을'{}'에 두어야하는지. – Makyen

답변

0

JSON sample here을 확인하는 경우 쉼표 다음에 해당 부분 뒤에 중괄호의 새 쌍이 아닌 "키"가 와야합니다. 이 파일을 제거하여 JSON 파일이 다음과 같이 보이게하십시오.

{ 
    "name": "Supreme Bot", 
    "description": "Automate the checkout process for supremenewyork.com!", 
    "version": "1.0.3", 
    "manifest_version": 2, 
    "permissions": ["*://*/*"], 
    "content_scripts": [ 
    { 
     "matches": ["*://*.supreme.com/*"], 
     "js": ["jquery.js", "supreme.js"] 
    } 
    ], 
    "browser_action": { 
    "default_icon" : "icon-16.png", 
    "default_title": "Enable/Disable" 
    }, 
    "background": { 
    "scripts": ["background.js"], 
    "persistent": false 
    }, 
    "icons": { 
    "16": "icon-16.png" 

    }, 

    "name": "Supreme Bot", 
    "options_page": "options.html", 
}