SyntaxError: Unexpected token } in JSON at position 547 at JSON.parse ()

SyntaxError: Unexpected token } in JSON at position 547

    at JSON.parse (<anonymous>)

错误例子:大括号里的最后一个键值对不能使用逗号隔开

{
    "test":{
        "test":1,
    },
    "test":{
        "test":1,
    },
}

正确的例子:

{
    "test":{
        "test":1
    },
    "test":{
        "test":1
    }
}

猜你喜欢

转载自blog.csdn.net/zhjw1991/article/details/85340863