Last active
November 22, 2019 23:38
-
-
Save duanebester/957165d5d332c44e3f219b431080f35b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models.responses | |
import spray.json.DefaultJsonProtocol | |
import models.common._ | |
// User.scala | |
case class User(id: Int, name: String, location: Location) extends GeoSearchable | |
object User extends DefaultJsonProtocol { | |
implicit val format = jsonFormat3(User.apply) | |
} | |
case class UsersResponse(hits: Seq[User], total: Long) extends SearchResponse[User] | |
object UsersResponse extends DefaultJsonProtocol { | |
implicit def format = jsonFormat2(UsersResponse.apply) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment