0

我的配置文件有问题。现在 JSONLint 说:

Error: Parse error on line 9:
    ...},   "description": "Jannen HomeKit”,    
    ---------------------^
    Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got         'undefined'

看来我的格式有一些问题。

{
"bridge": {
    "name": "jHomebridge",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-156"
},

"description": "Jannen HomeKit”,

"accessories": [
    {
        "accessory": "Applescript",
        "name": ”Videon katselu”
        "on": "tell application ’’Chrome’’ to open location ’’www.youtube.fi’’”,
        "off": "tell application ’’Chrome’’ to open location ’’www.youtube.fi’’"
    }
],

"platforms": [
    {
        "platform" : "WeMo Platform",
        "name" : "WeMo Platform"
        "expected_accessories" : "0",
        "timeout" : "25",
        "no_motion_timer": "60",
        "homekit_safe" : "1"
    }
]
4

1 回答 1

0

是的,您的 json 结构有问题。这个站点对 json 结构应该是什么有一个非常简单的解释。

但基本上这就是应该的样子......

"employees":[
    {"firstName":"John", "lastName":"Doe"}, 
    {"firstName":"Anna", "lastName":"Smith"}, 
    {"firstName":"Peter","lastName":"Jones"}
]

您的错误消息指向您行中的问题"description": "Jannen HomeKit”,

于 2016-04-08T17:23:54.377 回答