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

By | 12月 1, 2019

启动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

 

 

发表评论

您的电子邮箱地址不会被公开。