Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case class SimpleQuery[T](field : String, op : Operator, value : T) extends Query{
- def getType = ????
- }
- implicit def SimpleQueryJsonFormat[A <: JsonFormat] = jsonFormat4(SimpleQuery.apply[A])
- trait JsonFormat takes type parameters
- case class NamedList[A](name: String, items: List[A])
- object MyJsonProtocol extends DefaultJsonProtocol {
- implicit def namedListFormat[A :JsonFormat] = jsonFormat2(NamedList.apply[A])
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement