I'm using scala play-json to parse the keys from a simple json object from a string along the lines of
'{"test": "value", "hello": "world"}'
The code where I'm doing this looks like this:
val columns = Json.parse(value).as[JsObject].keys.toList
I was able to run this and get the result I wanted running the debugger in IntelliJ, so I know this code works fine. However, when I try to run sbt assembly
on my project, I get a build error saying
Validation.scala:126: bad symbolic reference to java.time encountered in class file 'DefaultReads.class'.
[error] Cannot access term time in package java. The current classpath may be missing a definition for java.time, or DefaultReads.class may have been compiled against a version that's incompatible with the one found on the current classpath.
[error] val values = Json.parse(value).as[JsObject].keys.toList
I'm running jdk 1.8.0_111 so I shouldn't be having the issue I've found on other SO posts trying to use the play-json library.
I'm using sbt version 0.13.13, scala version 2.11.0, and (trying to use) play-json version 2.5.12