Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以解释这里的语法吗?
implicit val rds = ( (__ \ 'name).read[String] and (__ \ 'age).read[Long] ) tupled
我特别不明白__,\和tupled表达式来自哪里
__
\
tupled
__是 JsPath 伴随对象的别名
\是解析symbol从 Json 对象读取的运算符。
symbol
tupled只需将它们放入 a中,tuple您就可以像case (name, age) =>您发布的文档中的示例一样执行操作。
tuple
case (name, age) =>