Compiler error after upgrade to 0.9.5-M2
Closed this issue · 3 comments
I have updated dependencies:
com.typesafe.play:play-json from 2.6.0-M7 to 2.6.9
com.eclipsesource:play-json-schema-validator from 0.9.0 to 0.9.5-M2
Now I have got the following compiler error for the last line:
val source: String = ...
val schema = Json.parse(source).as[JsObject]
val schemaType = Json.fromJson[SchemaType](schema).get
No Json deserializer found for type com.eclipsesource.schema.SchemaType. Try to implement an implicit Reads or Format for this type.
[error] private val schemaType = Json.fromJson[SchemaType](schema).get
Maybe I am too tired now and do not see obvious reason of the compiler error, but I could not find out where the Read formatter for SchemaType in the new version. What am I doing wrong?
With 0.9.5 Reads have become version specific, hence you need to import the respective version to make the Reads for that version available, e.g. as in
import Version7._
Let me know if that helps. I also realize that this is not mentioned anywhere in the docs, so I'll update them accordingly.
Ok, great. I'm closing this one then. The README also has been updated.