linux下json数据格式的配置文件报错ERROR: found an error in config.json: No JSON object could be decoded

随笔 一零 1周前 (12-01) 31次浏览 0个评论

启动 shadowsocks 报错

提示错误出现以下几种的情况:

ERROR: found an error in config.json: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
ERROR: found an error in config.json: Expecting property name enclosed in double quotes: line 9 column 1 (char 160)

说明配置文件中 json 数据格式存在问题,可根据提示定位具体哪个字符的问题,可能是由于多了空格导致,必须把多余的空格去掉,最后一个参数值后不能加逗号,注意引号必须是英文格式

ERROR: found an error in config.json: No JSON object could be decoded

这中情况需要注意 JSON 格式数据是否正确,格式如下:{“key”:”value”,”key1″:”vaue1″}

[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: Expecting property name enclosed in double quotes: line 2 column 21 (char 22)
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: No JSON object could be decoded
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: No JSON object could be decoded
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: No JSON object could be decoded
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: No JSON object could be decoded
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: No JSON object could be decoded
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json
ERROR: found an error in config.json: Expecting property name enclosed in double quotes: line 9 column 1 (char 160)
[root@vultr ~]# vi /etc/shadowsocks.json
[root@vultr ~]# ssserver -c /etc/shadowsocks.json
INFO: loading config from /etc/shadowsocks.json

 

 


爱码星 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:linux 下 json 数据格式的配置文件报错 ERROR: found an error in config.json: No JSON object could be decoded
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到