我正在尝试使用lift-json解析json。我正在关注此链接:http://alvinalexander.com/scala/scala-json-array-parser-parsing-example-lift-json。我遇到以下错误:
error while loading DefaultFormats, Scala signature DefaultFormats has wrong version
[error] expected: 5.0
[error] found: 4.1 in DefaultFormats.class
如何摆脱它?
答案 0 :(得分:0)
由于使用了错误版本的lift-json,出现此错误。使用与Scala版本兼容的正确版本。由于与Scala 2.11的兼容版本
,以下依赖项修复了该问题 <dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-json_2.11</artifactId>
<version>3.0.1</version>
</dependency>
我希望这可以帮助任何人在将来遇到同样的问题。