Open favetelinguis opened 8 years ago
Having trouble with getting the follwoing code workign as expected from the examples in the first page here on github.
case class SessionKey(sessionKey: String) extends PublicFeedArgsType object SessionKey { def makeSessionKey (key: String): Try[SessionKey] = { if (!validator(key)) throw new Exception("Session key not valid") else Success(SessionKey(key)) } private def validator(key: String):Boolean = { true } } trait DomainModelJsonSupport extends SprayJsonSupport with DefaultJsonProtocol { implicit val sessionKeyFormat = jsonFormat(SessionKey.apply, "session_key") }
SessionKey.apply gives me the error
SessionKey.apply
Missing arguments for method apply(String). Cannot resolve reference apply with such signature.
Any suggestions where this is different from the examples?
Having trouble with getting the follwoing code workign as expected from the examples in the first page here on github.
SessionKey.apply
gives me the errorAny suggestions where this is different from the examples?