【发布时间】:2016-11-11 16:16:23
【问题描述】:
我有以下配置文件,我想从 Scala 应用this library 使用:
P11 {
yes="0.0"
no="1.0"
}
P12 {
yes="0.01"
no="0.99"
}
P13 {
id = "123 567 \
T 0: \
If (f 23 <= 0.0)"
}
这就是我的做法:
import com.typesafe.config.ConfigFactory
val configFileName = "/usr/develop/tests/config.conf"
val parsedConfigMCF = ConfigFactory.parseFile(new File(configFileName))
val confMCF = ConfigFactory.load(parsedConfigMCF)
然后我得到错误:
Expecting a value but got wrong token: 'newline' (backslash followed by 'newline', this is not a valid escape sequence
它看起来不像\(反斜杠),但我需要在P13 中为id 添加几行。
【问题讨论】:
标签: typesafe-config