1
當我嘗試組合器http://www.playframework.com/documentation/2.2.x/ScalaJsonCombinators的文檔中的第一個示例時,它會在播放應用程序中使用scala文件引發repl中找不到的值和錯誤(嘗試使用播放2.2.0和播放2.1.1) - 追溯from the repl:playframework combinators文檔引發錯誤:未找到 - 爲什麼?
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>
那該怎麼解決?
thx
感謝了很多解釋和指針「play-framework Google小組討論」 – pellekrogholt