com.alibaba.fastjson.JSONException: expect ‘:‘ at 0, actual “

x33g5p2x  于2021-10-25 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(841)
com.alibaba.fastjson.JSONException: expect ':' at 0, actual "
	at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:290)
	at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1367)
	at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1333)
	at com.alibaba.fastjson.JSON.parse(JSON.java:152)
	at com.alibaba.fastjson.JSON.parse(JSON.java:162)
	at com.alibaba.fastjson.JSON.parse(JSON.java:131)
	at com.alibaba.fastjson.JSON.parseObject(JSON.java:223)
	at com.fastonetech.service.impl.FileRechargeService.processingFile(FileRechargeService.kt:36)
	at com.fastonetech.listener.fileRecharge.FileActionCallback.create(FileActionCallback.kt:45)
	at com.fastonetech.listener.fileRecharge.WatchDir.processEvents(WatchDir.kt:71)
	at com.fastonetech.listener.fileRecharge.WatchDir.<init>(WatchDir.kt:108)
	at com.fastonetech.init.AccountInit.createDirectorie$lambda-0(AccountInit.kt:85)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

com.alibaba.fastjson.JSONException 出现这个错误JSONException: expect ‘:’ at 0, actual "

json格式为:

{“payType”:“SYSTEM”,"account":2000,"remark":"2021-10-21给张三丰12账户充值"}

将json的中文字符修改为英文字符

{"payType":"SYSTEM","account":2000,"remark":"2021-10-21给张三丰12账户充值"}

相关文章