线程异常 "main" 此处不允许映射值
Exception in thread "main" mapping values are not allowed here
我在尝试解析 yaml 文件时出错
Yaml :
!!com.exalow.easymind.core.entities.UserImpl
avatarUrl: avatar.jpg
email: wowo.owow@magicmail.com
id: '8733a58c-4aaf-4da0-bbe7-aaf7ad66ab7a'
password: '1234'
username: Exalow
workspace: "Path"
错误:
Exception in thread "main" mapping values are not allowed here
in 'string', line 1, column 95:
... jpgemail: wowo.owow@magicmail.comid: '8733a58c-4aaf-4da0-bbe7-aaf7a ...
我使用此代码读取文件:https://pastebin.com/ThDRGxkN
似乎缺少行结束字符(至少前两行)。会不会是您首先使用 BufferedReader.readLine() 将文件中的内容读入字符串,而在将每一行添加到字符串后忘记添加换行符?
我在尝试解析 yaml 文件时出错
Yaml :
!!com.exalow.easymind.core.entities.UserImpl
avatarUrl: avatar.jpg
email: wowo.owow@magicmail.com
id: '8733a58c-4aaf-4da0-bbe7-aaf7ad66ab7a'
password: '1234'
username: Exalow
workspace: "Path"
错误:
Exception in thread "main" mapping values are not allowed here
in 'string', line 1, column 95:
... jpgemail: wowo.owow@magicmail.comid: '8733a58c-4aaf-4da0-bbe7-aaf7a ...
我使用此代码读取文件:https://pastebin.com/ThDRGxkN
似乎缺少行结束字符(至少前两行)。会不会是您首先使用 BufferedReader.readLine() 将文件中的内容读入字符串,而在将每一行添加到字符串后忘记添加换行符?