Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case class Result(mostMoney: String, mostHouses: String, leastCars: String)
- val route =
- path("evaluation") {
- parameterMultiMap { params =>
- validator.createResult(Parser.startProcess(params.get(key).get))
- val result = Result(
- validator.answerQuestion(validator.Question.MONEY),
- validator.answerQuestion(validator.Question.HOUSE),
- validator.answerQuestion(validator.Question.CARS))
- implicit val formats = Serialization.formats(NoTypeHints)
- val json = write(result)
- complete(json)
- }
- }
- {"$outer":{"host":"localhost","port":8080},"mostMoney":Frank,"mostHouses":Patrick,"mostCars":"Jack"}
Add Comment
Please, Sign In to add comment