why examples doas not compile ?
radoslawtwardy opened this issue · 5 comments
radoslawtwardy commented
When i try;
val authorNames = json.extract {String} (allAuthors)
i get:
error: could not find implicit value for evidence parameter of type cc.spray.json.lenses.package.Reader{String}
When i try:
val newJson1 = json.update(allAuthors ! set {String} ("John Doe"))
i get:
error: Cannot find JsonWriter or JsonFormat type class for String
// i must replaced [ with { because with [ i cant add properly msg
jrudolph commented
You need the import
import cc.spray.json.lenses.JsonLenses._
Have you tried that?
radoslawtwardy commented
Yes
jrudolph commented
I'm closing this, since you are the only one who ever complained about this issue and I couldn't reproduce it.
landon9720 commented
OP should double check the following imports exist:
import spray.json._
import DefaultJsonProtocol._
import lenses.JsonLenses._
Cadovvl commented
adding import
import DefaultJsonProtocol._
have helped me with the same problem