0

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?

Ravi Ranjan
  • 353
  • 1
  • 6
  • 22

1 Answers1

1

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.

Peter T.
  • 8,757
  • 3
  • 34
  • 32