0

http://simply.liftweb.net/index-5.4.html describes the LiftWeb REST.

What bothers me is that I can't exactly understand. For example,
case "count" :: Nil JsonGet _

I suspect that there is and implicit conventions from List to some another object, and I've found Get method that seems to accept List and Req type, but how it getting together? Please, help.

1

1 Answer 1

2

There actually is no implicit conversion going on here at all - JsonGet is an instance of TestGet, which provides an unapply method that returns an Option[(List[String], Req)]. Scala allows calling unapply as an infix method, so that construct is sugar for:

case JsonGet("cout" :: Nil, _) => // the second argument is the Req instance 
Sign up to request clarification or add additional context in comments.

1 Comment

thanks. My question doubles stackoverflow.com/questions/4008271/… And here is some explanation on the requirement of such extractors danielwestheide.com/blog/2012/11/21/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.