Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. case class SimpleQuery[T](field : String, op : Operator, value : T) extends Query{
  2. def getType = ????
  3. }
  4.  
  5. implicit def SimpleQueryJsonFormat[A <: JsonFormat] = jsonFormat4(SimpleQuery.apply[A])
  6.  
  7. trait JsonFormat takes type parameters
  8.  
  9. case class NamedList[A](name: String, items: List[A])
  10.  
  11. object MyJsonProtocol extends DefaultJsonProtocol {
  12. implicit def namedListFormat[A :JsonFormat] = jsonFormat2(NamedList.apply[A])
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement