【调试记录】syntax error near "}"

记一个bug:

注册gatt时,用的json,在每一个键值最后一定要注意逗号,最后一个键值的最后没有逗号!!就是因为不了解json这个原因,找了一上午问题,提示syntax error near "}" ,百度不出来问题

primary_service {
    uuid : UUID_SEAN_SERVICE,
    name : "SEAN_SERVICE",
    characteristic  {
        uuid        : UUID_SEAN_READ,
        name        : "SEAN_READ",
        flags       : [ FLAG_IRQ, FLAG_DYNLEN ],
        properties  : [ read ],
        value       : 0x0
    },

    characteristic {
        uuid        : UUID_SEAN_WRITE,
        name        : "SEAN_WRITE",
        flags       : [ FLAG_IRQ, FLAG_DYNLEN ],
        properties  : [ write_cmd, notify ],
        value       : 0x0
    }
},

 

你可能感兴趣的:(蓝牙)