当我在组合器http://www.playframework.com/documentation/2.2.x/ScalaJsonCombinators的文档中尝试第一个示例时,它会在 repl 中引发错误,并且在播放应用程序中找不到 scala 文件的值(尝试过使用 play 2.2.0 和 play 2.1.1) - 从 repl 追溯:
Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :paste
// Entering paste mode (ctrl-D to finish)
import play.api.libs.json._
import play.api.libs.functional.syntax._
val customReads: Reads[(String, Float, List[String])] =
(JsPath \ "key1").read[String](email keepAnd minLength(5)) and
(JsPath \ "key2").read[Float](min(45)) and
(JsPath \ "key3").read[List[String]]
tupled
// Exiting paste mode, now interpreting.
<console>:16: error: not found: value tupled
tupled
^
<console>:11: error: not found: value email
(JsPath \ "key1").read[String](email keepAnd minLength(5)) and
^
scala>
那么如何解决呢?
谢谢