Ravi Ranjan
Ravi Ranjan

Reputation: 353

error while loading DefaultFormats, Scala signature DefaultFormats has wrong version

I am trying to parse json using lift-json. I am following this link: http://alvinalexander.com/scala/scala-json-array-parser-parsing-example-lift-json. I am encountering the following error:

error while loading DefaultFormats, Scala signature DefaultFormats has wrong version
[error]  expected: 5.0
[error]  found: 4.1 in DefaultFormats.class

How do I get rid of it?

Upvotes: 0

Views: 790

Answers (1)

Peter Tadros
Peter Tadros

Reputation: 9297

This error appear due to using wrong version of lift-json. Use the correct version compatible with Scala version. The following dependency fixed the issue due to compatible version with Scala 2.11

    <dependency>
      <groupId>net.liftweb</groupId>
      <artifactId>lift-json_2.11</artifactId>
      <version>3.0.1</version>
   </dependency>

I hope this helps anyone gets the same issue in the future.

Upvotes: 1

Related Questions